diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-21 14:11:52 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-22 09:05:39 +0000 |
commit | 596c9eff21ef1197cc72d1eb5e46308f7a10f874 (patch) | |
tree | 4fdf79c1940b4a0d4e130acabe991517bd15d11f /meta/classes | |
parent | fdb52ade904e2d6c379f7f6859eef7dba26874b6 (diff) | |
download | poky-596c9eff21ef1197cc72d1eb5e46308f7a10f874.tar.gz |
package_ipk: Improve failure debug output
Currently if the dpkg-deb command fails you see an error message like this:
ERROR: nss-3.27.1-r0 do_package_write_ipk: opkg-build execution failed
ERROR: nss-3.27.1-r0 do_package_write_ipk: Function failed: do_package_ipk
which is pretty much useless. If we use subprocess.check_output, we see a
traceback and then:
Exception: subprocess.CalledProcessError: Command '<cmd>' returned non-zero exit status 1
Subprocess output:
<output>
which is much easier to debug from.
(From OE-Core rev: 64c8366a805e9cf0168ea2331c50c8d6a70c6dc4)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/package_ipk.bbclass | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index 039b6ab69b..9fb128b82b 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass | |||
@@ -244,11 +244,8 @@ python do_package_ipk () { | |||
244 | conffiles.close() | 244 | conffiles.close() |
245 | 245 | ||
246 | os.chdir(basedir) | 246 | os.chdir(basedir) |
247 | ret = subprocess.call("PATH=\"%s\" %s %s %s" % (localdata.getVar("PATH"), | 247 | subprocess.check_output("PATH=\"%s\" %s %s %s" % (localdata.getVar("PATH"), |
248 | d.getVar("OPKGBUILDCMD"), pkg, pkgoutdir), shell=True) | 248 | d.getVar("OPKGBUILDCMD"), pkg, pkgoutdir), shell=True) |
249 | if ret != 0: | ||
250 | bb.utils.unlockfile(lf) | ||
251 | bb.fatal("opkg-build execution failed") | ||
252 | 249 | ||
253 | if d.getVar('IPK_SIGN_PACKAGES') == '1': | 250 | if d.getVar('IPK_SIGN_PACKAGES') == '1': |
254 | ipkver = "%s-%s" % (d.getVar('PKGV'), d.getVar('PKGR')) | 251 | ipkver = "%s-%s" % (d.getVar('PKGV'), d.getVar('PKGR')) |