Patchwork [1/1] package.bbclass: Allow overriding of debugedit starting path

login
register
mail settings
Submitter Peter Seebach
Date July 11, 2012, 8:31 p.m.
Message ID <e0cae0d4228e9749d9835bf16a6154eafbdcc713.1342038551.git.peter.seebach@windriver.com>
Download mbox | patch
Permalink /patch/31781/
State Accepted
Commit 32b1fde106bf423873a4a56e1111f230494e2d4a
Headers show

Comments

Peter Seebach - July 11, 2012, 8:31 p.m.
In the usual case, the computed path used for debugedit to fix
up path references for the target filesystem is correct. However,
prebuilt binary components, such as prebuilt toolchains, can
have debug paths that do not reflect paths within the local
build directory. Providing an override lets us continue to use
the standard debugedit logic in package.bbclass.

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
---
 meta/classes/package.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index e6856cd..f0ca443 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -190,7 +190,7 @@  def splitfile(file, debugfile, debugsrcdir, d):
     objcopy = d.getVar("OBJCOPY", True)
     debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
     workdir = d.getVar("WORKDIR", True)
-    workparentdir = os.path.dirname(workdir)
+    workparentdir = d.getVar("DEBUGSRC_OVERRIDE_PATH", True) or os.path.dirname(workdir)
     sourcefile = d.expand("${WORKDIR}/debugsources.list")
 
     # We ignore kernel modules, we don't generate debug info files.