]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: Do not hide cpio's error
authorRobert Yang <liezhi.yang@windriver.com>
Fri, 14 Dec 2018 06:55:49 +0000 (14:55 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 11 Jan 2019 10:38:21 +0000 (10:38 +0000)
We use subprocess.check_output() to run the command, which means that we need care
about the error, so the 2>/dev/null should not be used, otherwise it is hard to
debug when the error happens.

I guess it was copied from previous lines, but that command's error can be
ignored (excpet: pass):
   try:
       subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
   except subprocess.CalledProcessError:
       # Can "fail" if internal headers/transient sources are attempted
       pass

But we don't do this in the current location, so remove "2>/dev/null"

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
meta/classes/package.bbclass

index 322c4ec77f3fee5a785c02ae0eb8e1cb50f2f7ae..be316510a63c2c68b9442e33535cec18cdf8858b 100644 (file)
@@ -471,7 +471,8 @@ def copydebugsources(debugsrcdir, d):
 
         # cpio seems to have a bug with -lL together and symbolic links are just copied, not dereferenced.
         # Work around this by manually finding and copying any symbolic links that made it through.
-        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)
+        cmd = "find %s%s -type l -print0 -delete | sed s#%s%s/##g | (cd '%s' ; cpio -pd0mL --no-preserve-owner '%s%s')" % \
+                (dvar, debugsrcdir, dvar, debugsrcdir, workparentdir, dvar, debugsrcdir)
         subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
 
         # The copy by cpio may have resulted in some empty directories!  Remove these