]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: Adapt debugsrc code to workdir layout changes
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 21 Nov 2012 09:06:35 +0000 (09:06 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 21 Nov 2012 09:09:47 +0000 (09:09 +0000)
With the change to WORKDIR layout, splutting PN and PV into two directories,
the debugsrc splutting code layout became suboptimal. This changes things to
include the information as it was before. Ideally this code would be written
to more generically support other layouts buts it not clear that the tools
would even support that right now so this is the best immediate fix.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass

index 15e505d4d68c701384c8793b2776a4dc52aabffa..3278d37b53441aa72b529417e7caff5ff4fb4a01 100644 (file)
@@ -232,7 +232,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 = d.getVar("DEBUGSRC_OVERRIDE_PATH", True) or os.path.dirname(workdir)
+    workparentdir = d.getVar("DEBUGSRC_OVERRIDE_PATH", True) or os.path.dirname(os.path.dirname(workdir))
     sourcefile = d.expand("${WORKDIR}/debugsources.list")
 
     # We ignore kernel modules, we don't generate debug info files.
@@ -277,8 +277,8 @@ def splitfile2(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)
-        workbasedir = os.path.basename(workdir)
+        workparentdir = os.path.dirname(os.path.dirname(workdir))
+        workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir)
 
         nosuchdir = []
         basepath = dvar