[bitbake-devel] build: Fix profile file names

Submitted by Richard Purdie on Aug. 31, 2013, 10:43 p.m.


Message ID 1377989017.1059.133.camel@ted
State New
Headers show

Commit Message

Richard Purdie Aug. 31, 2013, 10:43 p.m.
Using the basename of the .bb file is not unique, for example xxx-native
and xxx can overwrite each other. If this happens whilst running, you can
get odd backtraces as one file is parsed as another tries to write out
new data.

Avoid issues by using PN for the output filename instead.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Patch hide | download patch | download mbox

diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 91c3a42..a53aba9 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -467,7 +467,7 @@  def exec_task(fn, task, d, profile = False):
             quieterr = True
         if profile: 
-            profname = "profile-%s.log" % (os.path.basename(fn) + "-" + task)
+            profname = "profile-%s.log" % (d.getVar("PN", True) + "-" + task)
                 import cProfile as profile