]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.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)
committerAndreas Oberritter <obi@opendreambox.org>
Mon, 8 Apr 2019 11:49:57 +0000 (13:49 +0200)
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>
(cherry picked from commit 9ff023fb26f5f0ce19e757beda00ccc32c009b21)
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
meta/classes/package_deb.bbclass
meta/classes/package_ipk.bbclass

index 69363db7f4453b03af84af8b2bfe6a7fdd24df50..eb08572d8597e5c25a41aa63ef9aa9e29edc4506 100644 (file)
@@ -305,7 +305,9 @@ python do_package_deb () {
             conffiles.close()
 
         os.chdir(basedir)
-        subprocess.check_output("PATH=\"%s\" dpkg-deb --uniform-compression -b %s %s" % (localdata.getVar("PATH"), root, pkgoutdir), shell=True)
+        subprocess.check_output("PATH=\"%s\" dpkg-deb --uniform-compression -b %s %s" % (localdata.getVar("PATH"), root, pkgoutdir),
+                                stderr=subprocess.STDOUT,
+                                shell=True)
 
         cleanupcontrol(root)
         bb.utils.unlockfile(lf)
index 7d3a6a4e9e814f48b67ae6c202e5f860e8cb3577..4d2db94c9cd80a21574ee84c9d48bd613a12a76b 100644 (file)
@@ -232,7 +232,9 @@ python do_package_ipk () {
 
         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'))