[oe-commits] Paul Eggleton : classes/chrpath: trigger an error if chrpath fails

git at git.openembedded.org git at git.openembedded.org
Wed Aug 15 16:55:57 UTC 2012


Module: openembedded-core.git
Branch: master
Commit: 24babf9316da50c8a4d2f328c4336cb8cd6cf667
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=24babf9316da50c8a4d2f328c4336cb8cd6cf667

Author: Paul Eggleton <paul.eggleton at linux.intel.com>
Date:   Wed Aug 15 17:44:33 2012 +0100

classes/chrpath: trigger an error if chrpath fails

If chrpath failed here we were just silently ignoring it.

Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/chrpath.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass
index 10b5ca0..ad61fe0 100644
--- a/meta/classes/chrpath.bbclass
+++ b/meta/classes/chrpath.bbclass
@@ -74,7 +74,9 @@ def process_dir (directory, d):
             if len(new_rpaths):
                 args = ":".join(new_rpaths)
                 #bb.note("Setting rpath for %s to %s" %(fpath, args))
-                sub.call([cmd, '-r', args, fpath])
+                ret = sub.call([cmd, '-r', args, fpath])
+                if ret != 0:
+                    bb.error("chrpath command failed with exit code %d" % ret)
 
             if perms:
                 os.chmod(fpath, perms)





More information about the Openembedded-commits mailing list