summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_deb.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-21 13:55:36 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-22 09:05:39 +0000
commit53a3c5877458678732e43ec92798f0b3f6f9bac6 (patch)
tree38e39ae78ae75a9f6392ff4db25a3464d99905df /meta/classes/package_deb.bbclass
parentd6b3f722c767adb669312d9db55486794c15b08d (diff)
downloadpoky-53a3c5877458678732e43ec92798f0b3f6f9bac6.tar.gz
package_deb: 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_deb: dpkg-deb execution failed ERROR: nss-3.27.1-r0 do_package_write_deb: Function failed: do_package_deb 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: 18160442869f56ee71538bc2dc60d7cb6c08c8a2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_deb.bbclass')
-rw-r--r--meta/classes/package_deb.bbclass5
1 files changed, 1 insertions, 4 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 6ce008f1ac..2a70b50c9f 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -308,10 +308,7 @@ python do_package_deb () {
308 conffiles.close() 308 conffiles.close()
309 309
310 os.chdir(basedir) 310 os.chdir(basedir)
311 ret = subprocess.call("PATH=\"%s\" dpkg-deb -b %s %s" % (localdata.getVar("PATH"), root, pkgoutdir), shell=True) 311 subprocess.check_output("PATH=\"%s\" dpkg-deb -b %s %s" % (localdata.getVar("PATH"), root, pkgoutdir), shell=True)
312 if ret != 0:
313 bb.utils.unlockfile(lf)
314 bb.fatal("dpkg-deb execution failed")
315 312
316 cleanupcontrol(root) 313 cleanupcontrol(root)
317 bb.utils.unlockfile(lf) 314 bb.utils.unlockfile(lf)