diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/package.bbclass | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index b6f87674a0..5dca1043d7 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -254,14 +254,23 @@ def splitdebuginfo(file, debugfile, debugsrcdir, d): | |||
254 | 254 | ||
255 | # We need to extract the debug src information here... | 255 | # We need to extract the debug src information here... |
256 | if debugsrcdir: | 256 | if debugsrcdir: |
257 | subprocess.call("'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (debugedit, workparentdir, debugsrcdir, sourcefile, file), shell=True) | 257 | cmd = "'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (debugedit, workparentdir, debugsrcdir, sourcefile, file) |
258 | retval = subprocess.call(cmd, shell=True) | ||
259 | if retval: | ||
260 | bb.fatal("debugedit failed with exit code %s (cmd was %s)" % (retval, cmd)) | ||
258 | 261 | ||
259 | bb.utils.mkdirhier(os.path.dirname(debugfile)) | 262 | bb.utils.mkdirhier(os.path.dirname(debugfile)) |
260 | 263 | ||
261 | subprocess.call("'%s' --only-keep-debug '%s' '%s'" % (objcopy, file, debugfile), shell=True) | 264 | cmd = "'%s' --only-keep-debug '%s' '%s'" % (objcopy, file, debugfile) |
265 | retval = subprocess.call(cmd, shell=True) | ||
266 | if retval: | ||
267 | bb.fatal("objcopy failed with exit code %s (cmd was %s)" % (retval, cmd)) | ||
262 | 268 | ||
263 | # Set the debuglink to have the view of the file path on the target | 269 | # Set the debuglink to have the view of the file path on the target |
264 | subprocess.call("'%s' --add-gnu-debuglink='%s' '%s'" % (objcopy, debugfile, file), shell=True) | 270 | cmd = "'%s' --add-gnu-debuglink='%s' '%s'" % (objcopy, debugfile, file) |
271 | retval = subprocess.call(cmd, shell=True) | ||
272 | if retval: | ||
273 | bb.fatal("objcopy failed with exit code %s (cmd was %s)" % (retval, cmd)) | ||
265 | 274 | ||
266 | if newmode: | 275 | if newmode: |
267 | os.chmod(file, origmode) | 276 | os.chmod(file, origmode) |
@@ -298,10 +307,18 @@ def copydebugsources(debugsrcdir, d): | |||
298 | processdebugsrc += "fgrep -z '%s' | " | 307 | processdebugsrc += "fgrep -z '%s' | " |
299 | processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" | 308 | processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" |
300 | 309 | ||
301 | subprocess.call(processdebugsrc % (sourcefile, workbasedir, workparentdir, dvar, debugsrcdir), shell=True) | 310 | cmd = processdebugsrc % (sourcefile, workbasedir, workparentdir, dvar, debugsrcdir) |
311 | retval = subprocess.call(cmd, shell=True) | ||
312 | # Can "fail" if internal headers/transient sources are attempted | ||
313 | #if retval: | ||
314 | # bb.fatal("debug source copy failed with exit code %s (cmd was %s)" % (retval, cmd)) | ||
315 | |||
302 | 316 | ||
303 | # The copy by cpio may have resulted in some empty directories! Remove these | 317 | # The copy by cpio may have resulted in some empty directories! Remove these |
304 | subprocess.call("find %s%s -empty -type d -delete" % (dvar, debugsrcdir), shell=True) | 318 | cmd = "find %s%s -empty -type d -delete" % (dvar, debugsrcdir) |
319 | retval = subprocess.call(cmd, shell=True) | ||
320 | if retval: | ||
321 | bb.fatal("empty directory removal failed with exit code %s (cmd was %s)" % (retval, cmd)) | ||
305 | 322 | ||
306 | # Also remove debugsrcdir if its empty | 323 | # Also remove debugsrcdir if its empty |
307 | for p in nosuchdir[::-1]: | 324 | for p in nosuchdir[::-1]: |
@@ -431,7 +448,10 @@ python perform_packagecopy () { | |||
431 | # Start by package population by taking a copy of the installed | 448 | # Start by package population by taking a copy of the installed |
432 | # files to operate on | 449 | # files to operate on |
433 | # Preserve sparse files and hard links | 450 | # Preserve sparse files and hard links |
434 | subprocess.call('tar -cf - -C %s -ps . | tar -xf - -C %s' % (dest, dvar), shell=True) | 451 | cmd = 'tar -cf - -C %s -ps . | tar -xf - -C %s' % (dest, dvar) |
452 | retval = subprocess.call(cmd, shell=True) | ||
453 | if retval: | ||
454 | bb.fatal("file copy failed with exit code %s (cmd was %s)" % (retval, cmd)) | ||
435 | 455 | ||
436 | # replace RPATHs for the nativesdk binaries, to make them relocatable | 456 | # replace RPATHs for the nativesdk binaries, to make them relocatable |
437 | if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('cross-canadian', d): | 457 | if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('cross-canadian', d): |