summaryrefslogtreecommitdiffstats
path: root/meta/classes/chrpath.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-08-17 14:26:33 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-17 15:25:01 +0100
commit99815eddd4e1eb5d939831704231537dd5a995ad (patch)
treefd2b0eb02592664748092ae5b770230b62a05f92 /meta/classes/chrpath.bbclass
parentd6aa123fdbfa82c07e33a9b4c7aacad821184790 (diff)
downloadopenembedded-core-contrib-99815eddd4e1eb5d939831704231537dd5a995ad.tar.gz
classes/chrpath: improve chrpath failure handling
When chrpath fails, prefix the error message with the name of the recipe that is being processed, and include the the output from chrpath, as well as making the calling task actually fail. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/chrpath.bbclass')
-rw-r--r--meta/classes/chrpath.bbclass8
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass
index ad61fe09ea..89222484b8 100644
--- a/meta/classes/chrpath.bbclass
+++ b/meta/classes/chrpath.bbclass
@@ -74,9 +74,11 @@ def process_dir (directory, d):
if len(new_rpaths):
args = ":".join(new_rpaths)
#bb.note("Setting rpath for %s to %s" %(fpath, args))
- ret = sub.call([cmd, '-r', args, fpath])
- if ret != 0:
- bb.error("chrpath command failed with exit code %d" % ret)
+ p = sub.Popen([cmd, '-r', args, fpath],stdout=sub.PIPE,stderr=sub.PIPE)
+ out, err = p.communicate()
+ if p.returncode != 0:
+ bb.error("%s: chrpath command failed with exit code %d:\n%s%s" % (d.getVar('PN', True), p.returncode, out, err))
+ raise bb.build.FuncFailed
if perms:
os.chmod(fpath, perms)