summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorMikko Ylinen <mikko.ylinen@linux.intel.com>2017-09-27 11:08:15 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-10-07 23:20:39 +0100
commitedb4d9984b79bca3ad5d000aa563ebcc2e5740d4 (patch)
treeaad4c20a65a2fea5fe2da9e76c7e643c8b04c8a7 /meta/lib/oe
parent3833ec59bf7b43c20e8e06013c66b0c7697d28e4 (diff)
downloadpoky-edb4d9984b79bca3ad5d000aa563ebcc2e5740d4.tar.gz
package_manager: rpm: improve logging
To be able to better debug remove() behaviour, add more logging to rpm calls via bb.note(). The change also makes remove() logging more consistent with other package managers' remove() (e.g., opkg). (From OE-Core rev: 1a90c97616698050529e169a83e6f07a255687df) Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/package_manager.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 658c964277..d458a9b01d 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -614,10 +614,12 @@ class RpmPM(PackageManager):
614 self._invoke_dnf(["remove"] + pkgs) 614 self._invoke_dnf(["remove"] + pkgs)
615 else: 615 else:
616 cmd = bb.utils.which(os.getenv('PATH'), "rpm") 616 cmd = bb.utils.which(os.getenv('PATH'), "rpm")
617 args = ["-e", "--nodeps", "--root=%s" %self.target_rootfs] 617 args = ["-e", "-v", "--nodeps", "--root=%s" %self.target_rootfs]
618 618
619 try: 619 try:
620 bb.note("Running %s" % ' '.join([cmd] + args + pkgs))
620 output = subprocess.check_output([cmd] + args + pkgs, stderr=subprocess.STDOUT).decode("utf-8") 621 output = subprocess.check_output([cmd] + args + pkgs, stderr=subprocess.STDOUT).decode("utf-8")
622 bb.note(output)
621 except subprocess.CalledProcessError as e: 623 except subprocess.CalledProcessError as e:
622 bb.fatal("Could not invoke rpm. Command " 624 bb.fatal("Could not invoke rpm. Command "
623 "'%s' returned %d:\n%s" % (' '.join([cmd] + args + pkgs), e.returncode, e.output.decode("utf-8"))) 625 "'%s' returned %d:\n%s" % (' '.join([cmd] + args + pkgs), e.returncode, e.output.decode("utf-8")))