[oe-commits] [openembedded-core] 23/40: package.bbclass: Do not hide cpio's error

git at git.openembedded.org git at git.openembedded.org
Fri Jan 11 10:40:20 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 017a53d2743be2b5d4965a39b4e126fb74f700ad
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Fri Dec 14 14:55:49 2018 +0800

    package.bbclass: Do not hide cpio's error
    
    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 at windriver.com>
---
 meta/classes/package.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 322c4ec..be31651 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list