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:13 +0100
commit62f1ccbbbd536c85554c556bbbfd506088aebefb (patch)
tree0fdc303473e475f1c305da9ff93140747c3714fa /meta/classes/chrpath.bbclass
parentbddd8300325267253941e7ce656ce2cf86a8a4a4 (diff)
downloadpoky-62f1ccbbbd536c85554c556bbbfd506088aebefb.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. (From OE-Core rev: 99815eddd4e1eb5d939831704231537dd5a995ad) 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):
74 if len(new_rpaths): 74 if len(new_rpaths):
75 args = ":".join(new_rpaths) 75 args = ":".join(new_rpaths)
76 #bb.note("Setting rpath for %s to %s" %(fpath, args)) 76 #bb.note("Setting rpath for %s to %s" %(fpath, args))
77 ret = sub.call([cmd, '-r', args, fpath]) 77 p = sub.Popen([cmd, '-r', args, fpath],stdout=sub.PIPE,stderr=sub.PIPE)
78 if ret != 0: 78 out, err = p.communicate()
79 bb.error("chrpath command failed with exit code %d" % ret) 79 if p.returncode != 0:
80 bb.error("%s: chrpath command failed with exit code %d:\n%s%s" % (d.getVar('PN', True), p.returncode, out, err))
81 raise bb.build.FuncFailed
80 82
81 if perms: 83 if perms:
82 os.chmod(fpath, perms) 84 os.chmod(fpath, perms)