]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bb.build: use relative log links, not absolute
authorChristopher Larson <chris_larson@mentor.com>
Tue, 27 Mar 2012 19:07:23 +0000 (14:07 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 28 Mar 2012 21:28:00 +0000 (22:28 +0100)
Using symlinks to absolute paths isn't gaining us anything, and can cause
problems in situations such as automated build systems when they try to
resolve the link, depending on the mechanism used to pull the build artifacts
(e.g. nfs).

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/build.py

index 736ba2439374b891565df19866dbacf4d774449f..95f1dcfcb7e61fd67e8a94eb15c9f05edd35f112 100644 (file)
@@ -291,12 +291,13 @@ def _exec_task(fn, task, d, quieterr):
 
     bb.utils.mkdirhier(tempdir)
     loglink = os.path.join(tempdir, 'log.{0}'.format(task))
-    logfn = os.path.join(tempdir, 'log.{0}.{1}'.format(task, os.getpid()))
+    logbase = 'log.{0}.{1}'.format(task, os.getpid())
+    logfn = os.path.join(tempdir, logbase)
     if loglink:
         bb.utils.remove(loglink)
 
         try:
-           os.symlink(logfn, loglink)
+           os.symlink(logbase, loglink)
         except OSError:
            pass