diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2011-03-10 11:51:26 -0600 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2011-03-10 18:11:51 -0800 |
commit | dbc752c75786b0985fbeb4986467ae01290f424a (patch) | |
tree | c615b09c87406c208d2fdd3986916fb5ec4f1ac4 /meta/classes | |
parent | 3845eb8285d6b57fe2b824ce482cbeaba561eef5 (diff) | |
download | openembedded-core-dbc752c75786b0985fbeb4986467ae01290f424a.tar.gz openembedded-core-dbc752c75786b0985fbeb4986467ae01290f424a.tar.bz2 openembedded-core-dbc752c75786b0985fbeb4986467ae01290f424a.zip |
package.bbclass: Change the debug directory to avoid conflicts
The debug directory before was below ${WORKDIR}. Unfortunately if
something was based on a git tree, it meant that "git" was the
directory name being preserved for usr/src/debug usage. The patch
moves to using "${WORKDIR}/.." as the base, to ensure that the
WORKDIR naming is used in usr/src/debug.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/package.bbclass | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 137de09bc0..a7a5894b43 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -180,6 +180,7 @@ def splitfile(file, debugfile, debugsrcdir, d): objcopy = bb.data.getVar("OBJCOPY", d, True) debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d) workdir = bb.data.expand("${WORKDIR}", d) + workparentdir = os.path.dirname(workdir) sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d) # We ignore kernel modules, we don't generate debug info files. @@ -194,7 +195,7 @@ def splitfile(file, debugfile, debugsrcdir, d): # We need to extract the debug src information here... if debugsrcdir: - os.system("%s'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (pathprefix, debugedit, workdir, debugsrcdir, sourcefile, file)) + os.system("%s'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (pathprefix, debugedit, workparentdir, debugsrcdir, sourcefile, file)) bb.mkdirhier(os.path.dirname(debugfile)) @@ -222,15 +223,20 @@ def splitfile2(debugsrcdir, d): objcopy = bb.data.getVar("OBJCOPY", d, True) debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d) workdir = bb.data.expand("${WORKDIR}", d) + workparentdir = os.path.dirname(workdir) + workbasedir = os.path.basename(workdir) sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d) if debugsrcdir: bb.mkdirhier("%s%s" % (dvar, debugsrcdir)) processdebugsrc = "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '(<internal>|<built-in>)$' | " + # We need to ignore files that are not actually ours + # we do this by only paying attention to items from this package + processdebugsrc += "egrep -z '%s' | " processdebugsrc += "(cd '%s' ; cpio -pd0mL '%s%s' 2>/dev/null)" - os.system(processdebugsrc % (sourcefile, workdir, dvar, debugsrcdir)) + os.system(processdebugsrc % (sourcefile, workbasedir, workparentdir, dvar, debugsrcdir)) # The copy by cpio may have resulted in some empty directories! Remove these for root, dirs, files in os.walk("%s%s" % (dvar, debugsrcdir)): |