mirror of
https://git.yoctoproject.org/poky
synced 2026-02-15 13:13:02 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
3833ec59bf
commit
edb4d9984b
@@ -614,10 +614,12 @@ class RpmPM(PackageManager):
|
||||
self._invoke_dnf(["remove"] + pkgs)
|
||||
else:
|
||||
cmd = bb.utils.which(os.getenv('PATH'), "rpm")
|
||||
args = ["-e", "--nodeps", "--root=%s" %self.target_rootfs]
|
||||
args = ["-e", "-v", "--nodeps", "--root=%s" %self.target_rootfs]
|
||||
|
||||
try:
|
||||
bb.note("Running %s" % ' '.join([cmd] + args + pkgs))
|
||||
output = subprocess.check_output([cmd] + args + pkgs, stderr=subprocess.STDOUT).decode("utf-8")
|
||||
bb.note(output)
|
||||
except subprocess.CalledProcessError as e:
|
||||
bb.fatal("Could not invoke rpm. Command "
|
||||
"'%s' returned %d:\n%s" % (' '.join([cmd] + args + pkgs), e.returncode, e.output.decode("utf-8")))
|
||||
|
||||
Reference in New Issue
Block a user