All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bb.build: use relative log links, not absolute
@ 2012-03-27 19:07 Christopher Larson
  2012-03-28 21:28 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Christopher Larson @ 2012-03-27 19:07 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

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>
---
 lib/bb/build.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/bb/build.py b/lib/bb/build.py
index 736ba24..95f1dcf 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -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
 
-- 
1.7.7




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-28 21:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-27 19:07 [PATCH] bb.build: use relative log links, not absolute Christopher Larson
2012-03-28 21:28 ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.