summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-03-10 11:51:26 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-10 18:46:01 -0800
commitd8a82c2e79375f4895623138a2c0d5ae81f9d6a0 (patch)
tree9df28e7fc7d4f51b68b2927c6fc3e4203271c26b /meta
parentea99160e59955797b5fe2b1a9d688f03bb6fde2d (diff)
downloadpoky-d8a82c2e79375f4895623138a2c0d5ae81f9d6a0.tar.gz
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. (From OE-Core rev: dbc752c75786b0985fbeb4986467ae01290f424a) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/package.bbclass10
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):
180 objcopy = bb.data.getVar("OBJCOPY", d, True) 180 objcopy = bb.data.getVar("OBJCOPY", d, True)
181 debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d) 181 debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d)
182 workdir = bb.data.expand("${WORKDIR}", d) 182 workdir = bb.data.expand("${WORKDIR}", d)
183 workparentdir = os.path.dirname(workdir)
183 sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d) 184 sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d)
184 185
185 # We ignore kernel modules, we don't generate debug info files. 186 # We ignore kernel modules, we don't generate debug info files.
@@ -194,7 +195,7 @@ def splitfile(file, debugfile, debugsrcdir, d):
194 195
195 # We need to extract the debug src information here... 196 # We need to extract the debug src information here...
196 if debugsrcdir: 197 if debugsrcdir:
197 os.system("%s'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (pathprefix, debugedit, workdir, debugsrcdir, sourcefile, file)) 198 os.system("%s'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (pathprefix, debugedit, workparentdir, debugsrcdir, sourcefile, file))
198 199
199 bb.mkdirhier(os.path.dirname(debugfile)) 200 bb.mkdirhier(os.path.dirname(debugfile))
200 201
@@ -222,15 +223,20 @@ def splitfile2(debugsrcdir, d):
222 objcopy = bb.data.getVar("OBJCOPY", d, True) 223 objcopy = bb.data.getVar("OBJCOPY", d, True)
223 debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d) 224 debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d)
224 workdir = bb.data.expand("${WORKDIR}", d) 225 workdir = bb.data.expand("${WORKDIR}", d)
226 workparentdir = os.path.dirname(workdir)
227 workbasedir = os.path.basename(workdir)
225 sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d) 228 sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d)
226 229
227 if debugsrcdir: 230 if debugsrcdir:
228 bb.mkdirhier("%s%s" % (dvar, debugsrcdir)) 231 bb.mkdirhier("%s%s" % (dvar, debugsrcdir))
229 232
230 processdebugsrc = "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '(<internal>|<built-in>)$' | " 233 processdebugsrc = "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '(<internal>|<built-in>)$' | "
234 # We need to ignore files that are not actually ours
235 # we do this by only paying attention to items from this package
236 processdebugsrc += "egrep -z '%s' | "
231 processdebugsrc += "(cd '%s' ; cpio -pd0mL '%s%s' 2>/dev/null)" 237 processdebugsrc += "(cd '%s' ; cpio -pd0mL '%s%s' 2>/dev/null)"
232 238
233 os.system(processdebugsrc % (sourcefile, workdir, dvar, debugsrcdir)) 239 os.system(processdebugsrc % (sourcefile, workbasedir, workparentdir, dvar, debugsrcdir))
234 240
235 # The copy by cpio may have resulted in some empty directories! Remove these 241 # The copy by cpio may have resulted in some empty directories! Remove these
236 for root, dirs, files in os.walk("%s%s" % (dvar, debugsrcdir)): 242 for root, dirs, files in os.walk("%s%s" % (dvar, debugsrcdir)):