diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/package.bbclass | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 81cb0c049c..2fab39005c 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -430,6 +430,7 @@ def copydebugsources(debugsrcdir, d): | |||
430 | # and copied to the destination here. | 430 | # and copied to the destination here. |
431 | 431 | ||
432 | import stat | 432 | import stat |
433 | import subprocess | ||
433 | 434 | ||
434 | sourcefile = d.expand("${WORKDIR}/debugsources.list") | 435 | sourcefile = d.expand("${WORKDIR}/debugsources.list") |
435 | if debugsrcdir and os.path.isfile(sourcefile): | 436 | if debugsrcdir and os.path.isfile(sourcefile): |
@@ -466,23 +467,20 @@ def copydebugsources(debugsrcdir, d): | |||
466 | processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" | 467 | processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" |
467 | 468 | ||
468 | cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) | 469 | cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) |
469 | (retval, output) = oe.utils.getstatusoutput(cmd) | 470 | try: |
470 | # Can "fail" if internal headers/transient sources are attempted | 471 | subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) |
471 | #if retval: | 472 | except subprocess.CalledProcessError: |
472 | # bb.fatal("debug source copy failed with exit code %s (cmd was %s)" % (retval, cmd)) | 473 | # Can "fail" if internal headers/transient sources are attempted |
474 | pass | ||
473 | 475 | ||
474 | # cpio seems to have a bug with -lL together and symbolic links are just copied, not dereferenced. | 476 | # cpio seems to have a bug with -lL together and symbolic links are just copied, not dereferenced. |
475 | # Work around this by manually finding and copying any symbolic links that made it through. | 477 | # Work around this by manually finding and copying any symbolic links that made it through. |
476 | cmd = "find %s%s -type l -print0 -delete | sed s#%s%s/##g | (cd '%s' ; cpio -pd0mL --no-preserve-owner '%s%s' 2>/dev/null)" % (dvar, debugsrcdir, dvar, debugsrcdir, workparentdir, dvar, debugsrcdir) | 478 | cmd = "find %s%s -type l -print0 -delete | sed s#%s%s/##g | (cd '%s' ; cpio -pd0mL --no-preserve-owner '%s%s' 2>/dev/null)" % (dvar, debugsrcdir, dvar, debugsrcdir, workparentdir, dvar, debugsrcdir) |
477 | (retval, output) = oe.utils.getstatusoutput(cmd) | 479 | subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) |
478 | if retval: | ||
479 | bb.fatal("debugsrc symlink fixup failed with exit code %s (cmd was %s)" % (retval, cmd)) | ||
480 | 480 | ||
481 | # The copy by cpio may have resulted in some empty directories! Remove these | 481 | # The copy by cpio may have resulted in some empty directories! Remove these |
482 | cmd = "find %s%s -empty -type d -delete" % (dvar, debugsrcdir) | 482 | cmd = "find %s%s -empty -type d -delete" % (dvar, debugsrcdir) |
483 | (retval, output) = oe.utils.getstatusoutput(cmd) | 483 | subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) |
484 | if retval: | ||
485 | bb.fatal("empty directory removal failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else "")) | ||
486 | 484 | ||
487 | # Also remove debugsrcdir if its empty | 485 | # Also remove debugsrcdir if its empty |
488 | for p in nosuchdir[::-1]: | 486 | for p in nosuchdir[::-1]: |
@@ -643,6 +641,8 @@ python package_do_split_locales() { | |||
643 | } | 641 | } |
644 | 642 | ||
645 | python perform_packagecopy () { | 643 | python perform_packagecopy () { |
644 | import subprocess | ||
645 | |||
646 | dest = d.getVar('D') | 646 | dest = d.getVar('D') |
647 | dvar = d.getVar('PKGD') | 647 | dvar = d.getVar('PKGD') |
648 | 648 | ||
@@ -650,9 +650,7 @@ python perform_packagecopy () { | |||
650 | # files to operate on | 650 | # files to operate on |
651 | # Preserve sparse files and hard links | 651 | # Preserve sparse files and hard links |
652 | cmd = 'tar -cf - -C %s -p . | tar -xf - -C %s' % (dest, dvar) | 652 | cmd = 'tar -cf - -C %s -p . | tar -xf - -C %s' % (dest, dvar) |
653 | (retval, output) = oe.utils.getstatusoutput(cmd) | 653 | subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) |
654 | if retval: | ||
655 | bb.fatal("file copy failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else "")) | ||
656 | 654 | ||
657 | # replace RPATHs for the nativesdk binaries, to make them relocatable | 655 | # replace RPATHs for the nativesdk binaries, to make them relocatable |
658 | if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('cross-canadian', d): | 656 | if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('cross-canadian', d): |