aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-10-06 14:36:51 -0400
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-10-06 14:36:51 -0400
commit69625548bf020685cdcb57dffe8f34aba80f11e5 (patch)
tree5bb70bec6ccb812d37b3c18ef053931c4133dc53
parent37bfad5ce8cc5d2c52ca75770b1c8e895e198e9d (diff)
parent239e9f2671eb641304716342e7188fb2a48fd462 (diff)
downloadbuild-69625548bf020685cdcb57dffe8f34aba80f11e5.tar.gz
Merge change I239e9f26 into donut
* changes: Bug in Mac build where it gets confused over case, fix no longer needed. (cherry picked from commit e44fadeb49aac9d762f089ee2f23e4a4907a822f)
-rwxr-xr-xtools/releasetools/img_from_target_files13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/releasetools/img_from_target_files b/tools/releasetools/img_from_target_files
index 00abde47d7..d157dca3ff 100755
--- a/tools/releasetools/img_from_target_files
+++ b/tools/releasetools/img_from_target_files
@@ -31,6 +31,7 @@ if sys.hexversion < 0x02040000:
print >> sys.stderr, "Python 2.4 or newer is required."
sys.exit(1)
+import errno
import os
import re
import shutil
@@ -82,8 +83,16 @@ def AddSystem(output_zip):
# The name of the directory it is making an image out of matters to
# mkyaffs2image. It wants "system" but we have a directory named
# "SYSTEM", so create a symlink.
- os.symlink(os.path.join(OPTIONS.input_tmp, "SYSTEM"),
- os.path.join(OPTIONS.input_tmp, "system"))
+ try:
+ os.symlink(os.path.join(OPTIONS.input_tmp, "SYSTEM"),
+ os.path.join(OPTIONS.input_tmp, "system"))
+ except OSError, e:
+ # bogus error on my mac version?
+ # File "./build/tools/releasetools/img_from_target_files", line 86, in AddSystem
+ # os.path.join(OPTIONS.input_tmp, "system"))
+ # OSError: [Errno 17] File exists
+ if (e.errno == errno.EEXIST):
+ pass
p = common.Run(["mkyaffs2image", "-f",
os.path.join(OPTIONS.input_tmp, "system"), img.name])