aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2016-12-21 10:48:11 +0800
committerChen Qi <Qi.Chen@windriver.com>2016-12-23 10:56:00 +0800
commit525bc19d379cb5f2b774a7593f213de26dc2ae18 (patch)
tree14d81da4dcdff9289e6dcde19071336815ca80d3
parent425afe2484707640ac71194885fdb263e95e9950 (diff)
downloadopenembedded-core-contrib-525bc19d379cb5f2b774a7593f213de26dc2ae18.tar.gz
openembedded-core-contrib-525bc19d379cb5f2b774a7593f213de26dc2ae18.tar.bz2
openembedded-core-contrib-525bc19d379cb5f2b774a7593f213de26dc2ae18.zip
package_manager: default to have scriptlet output captured in log
We need to have scriptlet output captured in log. If we don't do so, some useful information from scriptlets (especially postinstall script) would be missing. In case a script has a warning message but it does not necessarily have to fail, the message should be captured. Opkg has already done that. Change for rpm and dpkg so that scriptlet output is captured and no warning message is missing. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-rw-r--r--meta/lib/oe/package_manager.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index e5574739999..19364f6d188 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -669,11 +669,11 @@ class RpmPM(PackageManager):
self.install_dir_path = os.path.join(self.target_rootfs, self.install_dir_name)
self.rpm_cmd = bb.utils.which(os.getenv('PATH'), "rpm")
self.smart_cmd = bb.utils.which(os.getenv('PATH'), "smart")
- # 0 = default, only warnings
- # 1 = --log-level=info (includes information about executing scriptlets and their output)
+ # 0 = --log-level=warning, only warnings
+ # 1 = --log-level=info (includes information about executing scriptlets and their output), default
# 2 = --log-level=debug
# 3 = --log-level=debug plus dumps of scriplet content and command invocation
- self.debug_level = int(d.getVar('ROOTFS_RPM_DEBUG') or "0")
+ self.debug_level = int(d.getVar('ROOTFS_RPM_DEBUG') or "1")
self.smart_opt = ["--log-level=%s" %
("warning" if self.debug_level == 0 else
"info" if self.debug_level == 1 else
@@ -2024,8 +2024,9 @@ class DpkgPM(OpkgDpkgPM):
try:
bb.note("Executing %s for package: %s ..." %
(control_script.name.lower(), pkg_name))
- subprocess.check_output([p_full, control_script.argument],
- stderr=subprocess.STDOUT)
+ output = subprocess.check_output([p_full, control_script.argument],
+ stderr=subprocess.STDOUT).decode("utf-8")
+ bb.note(output)
except subprocess.CalledProcessError as e:
bb.note("%s for package %s failed with %d:\n%s" %
(control_script.name, pkg_name, e.returncode,