bug 456466, fix symlinks depend builds, r=ted, mnyromyr
authorAxel Hecht <l10n@mozilla.com>
Thu, 25 Sep 2008 20:22:26 +0200
changeset 19726 4d57bfc569f537d53067e33ee5a11bdfb523aa97
parent 19725 cdfaac3ff235fbf8c4eb983b6e9e772f1e8592d1
child 19727 466ff00e8382ec5911fef41524292568ae8f01b7
push idunknown
push userunknown
push dateunknown
reviewersted, mnyromyr
bugs456466
milestone1.9.1b1pre
bug 456466, fix symlinks depend builds, r=ted, mnyromyr
config/JarMaker.py
--- a/config/JarMaker.py
+++ b/config/JarMaker.py
@@ -389,16 +389,22 @@ class JarMaker(object):
       return out
 
   class OutputHelper_symlink(OutputHelper_flat):
     '''Subclass of OutputHelper_flat that provides a helper for
     creating a symlink including creating the parent directories.
     '''
     def symlink(self, src, dest):
       out = self.ensureDirFor(dest)
+      # remove previous link or file
+      try:
+        os.remove(out)
+      except OSError, e:
+        if e.errno != 2:
+          raise
       os.symlink(src, out)
 
 def main():
   jm = JarMaker()
   p = jm.getCommandLineParser()
   (options, args) = p.parse_args()
   jm.processIncludes(options.I)
   jm.outputFormat = options.f