summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-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)):