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 <s...@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

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to