[OE-core] [PATCH] package_deb.bbclass: report error during creation
Jens Rehsack
sno at netbsd.org
Sat Dec 15 12:59:26 UTC 2018
Default error message -- when .deb creation fails -- is just the command
and error code. With this piece, the error message is known, too.
Signed-off-by: Jens Rehsack <sno at netbsd.org>
---
meta/classes/package_deb.bbclass | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 6f81591653..21b55e3cc9 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -269,9 +269,17 @@ def deb_write_pkg(pkg, d):
conffiles.close()
os.chdir(basedir)
- subprocess.check_output("PATH=\"%s\" dpkg-deb -b %s %s" % (localdata.getVar("PATH"), root, pkgoutdir),
- stderr=subprocess.STDOUT,
- shell=True)
+ try:
+ subprocess.check_output("PATH=\"%s\" dpkg-deb -b %s %s" % (localdata.getVar("PATH"), root, pkgoutdir),
+ stderr=subprocess.STDOUT,
+ shell=True)
+ except subprocess.CalledProcessError as cpe:
+ bb.note("%s" % cpe)
+ bb.note("%s" % cpe.stdout)
+ bb.note("%s" % cpe.stderr)
+ raise
+ except:
+ raise
finally:
cleanupcontrol(root)
--
2.17.1
More information about the Openembedded-core
mailing list