package_manager.py: set dnf always debug verbosity
PATCH v2 1/1 package_manager.py: set dnf always debug verbosity
Removed an undocumented configuration variable called ROOTFS_RPM_DEBUG. This configuration toggled the verbosity of the dnf command. We now have verbosity permanently turned on and instead of directing this verbosity to bb.note we direct it to bb.debug.
Having the verbosity enabled will allow to watch the progress of the dnf package manager during the do_rootfs task with the debug enabled in bitbake.
An example of the impact from enabling the verbose output.
bitbake core-image-minimal
rm -rf tmp
bitbake core-image-minimal
Before patch 4m39,403s
After patch 4m42,441s
--- meta/lib/oe/package_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oe/package_manager.py +2 -2
@@ -884,7 +884,7 @@ class RpmPM(PackageManager): os.environ['RPM_ETCCONFIGDIR'] = self.target_rootfs dnf_cmd = bb.utils.which(os.getenv('PATH'), "dnf") - standard_dnf_args = (["-v", "--rpmverbosity=debug"] if self.d.getVar('ROOTFS_RPM_DEBUG') else []) + ["-y", + standard_dnf_args = ["-v", "--rpmverbosity=debug", "-y", "-c", oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"), "--setopt=reposdir=%s" %(oe.path.join(self.target_rootfs, "etc/yum.repos.d")), "--repofrompath=oe-repo,%s" % (self.rpm_repo_dir),
@@ -892,7 +892,7 @@ class RpmPM(PackageManager): "--setopt=logdir=%s" % (self.d.getVar('T')) ] cmd = [dnf_cmd] + standard_dnf_args + dnf_args - bb.note('Running %s' % ' '.join(cmd)) + bb.debug(1, 'Running %s' % ' '.join(cmd)) try: output = subprocess.check_output(cmd,stderr=subprocess.STDOUT).decode("utf-8") if print_output:
Signature · 1 line
2.14.1
meta/lib/oe/package_manager.py class RpmPM(PackageManager): · line 895
Quoted 6 lines · Paulo Neves
meta/lib/oe/package_manager.py +1
-1@@ -892,7 +892,7 @@ class RpmPM(PackageManager): "--setopt=logdir=%s" % (self.d.getVar('T')) ] cmd = [dnf_cmd] + standard_dnf_args + dnf_args - bb.note('Running %s' % ' '.join(cmd)) + bb.debug(1, 'Running %s' % ' '.join(cmd))
This should stay as bb.note. It only prints the command with arguments that is about to be executed.
meta/lib/oe/package_manager.py class RpmPM(PackageManager): · line 898
Quoted 4 lines
meta/lib/oe/package_manager.py +0
-0try: output = subprocess.check_output(cmd,stderr=subprocess.STDOUT).decode("utf-8") if print_output:
The actual output is logged just after these lines, so tweak it there please. Also, this should be a separate patch.
Alex