Bug 664907 - Don't link to self when dealing with files in the object directory, r=khuey
authorMichael Wu <mwu@mozilla.com>
Mon, 25 Jul 2011 21:57:28 -0700
changeset 74094 dd550792ca90e22ebf0ae463af9426bfcae07b22
parent 74093 d6fe12d237b0a4983494159bb57a605e2c0c494c
child 74095 95eda84ea6babca4d7d43e65db1bc803252431d8
push id235
push userbzbarsky@mozilla.com
push dateTue, 27 Sep 2011 17:13:04 +0000
treeherdermozilla-beta@2d1e082d176a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs664907
milestone8.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 664907 - Don't link to self when dealing with files in the object directory, r=khuey When using files in the current working directory, JarMaker.py uses '.' as the base directory, which ends up giving us links like bookmarks.json -> ./bookmarks.json . This replaces '.' with the actual working directory to give us proper symlinks.
config/JarMaker.py
--- a/config/JarMaker.py
+++ b/config/JarMaker.py
@@ -378,17 +378,17 @@ class JarMaker(object):
       elif src.startswith('/'):
         # path/in/jar/file_name.xul     (/path/in/sourcetree/file_name.xul)
         # refers to a path relative to topsourcedir, use that as base
         # and strip the leading '/'
         src_base = [topsourcedir]
         src = src[1:]
       else:
         # use srcdirs and the objdir (current working dir) for relative paths
-        src_base = sourcedirs + ['.']
+        src_base = sourcedirs + [os.getcwd()]
       # check if the source file exists
       realsrc = None
       for _srcdir in src_base:
         if os.path.isfile(os.path.join(_srcdir, src)):
           realsrc = os.path.join(_srcdir, src)
           break
       if realsrc is None:
         if jf is not None: