]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_deb, ipk: improve subprocess output on package manager command
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Mon, 4 Sep 2017 21:35:47 +0000 (14:35 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 11 Sep 2017 16:30:10 +0000 (17:30 +0100)
Redirecting stderr to stdout helps debugging issues, i.e instead of just
getting the return code, get also the error log from the pkg manger
This commit is in the way to figure out the root cause of [YOCTO #12012],
where dpkg-deb fails with a 2 return code and according to the man page,
there are multiple issues leading to the same code.

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/package_deb.bbclass
meta/classes/package_ipk.bbclass

index 83baa6c21be724ee51f9dab1d216bd37052b24cb..30605344f44b4908ed826d85072e4a45db7175d8 100644 (file)
@@ -286,7 +286,9 @@ 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), shell=True)
+        subprocess.check_output("PATH=\"%s\" dpkg-deb -b %s %s" % (localdata.getVar("PATH"), root, pkgoutdir),
+                                stderr=subprocess.STDOUT,
+                                shell=True)
 
     finally:
         cleanupcontrol(root)
index d58b824d3a154731abd58c5406f8825bfe93134d..ec90996184b2ab3ae0da8096a7a56bcc56139f7a 100644 (file)
@@ -244,7 +244,9 @@ def ipk_write_pkg(pkg, d):
 
         os.chdir(basedir)
         subprocess.check_output("PATH=\"%s\" %s %s %s" % (localdata.getVar("PATH"),
-                                                          d.getVar("OPKGBUILDCMD"), pkg, pkgoutdir), shell=True)
+                                                          d.getVar("OPKGBUILDCMD"), pkg, pkgoutdir),
+                                stderr=subprocess.STDOUT,
+                                shell=True)
 
         if d.getVar('IPK_SIGN_PACKAGES') == '1':
             ipkver = "%s-%s" % (d.getVar('PKGV'), d.getVar('PKGR'))