Log versions of all installed packages

JIRA: RHELCMP-9493
Signed-off-by: Haibo Lin <hlin@redhat.com>
(cherry picked from commit 8c06b7a3f1)
This commit is contained in:
Haibo Lin 2023-02-06 16:12:37 +08:00 committed by Stepan Oksanichenko
parent 2ff8132eaf
commit 4637fd6697
Signed by: soksanichenko
GPG Key ID: AB9983172AB1E45B
1 changed files with 8 additions and 0 deletions

View File

@ -382,6 +382,14 @@ def run_compose(
compose.log_info("Current timezone offset: %s" % pungi.util.get_tz_offset())
compose.log_info("COMPOSE_ID=%s" % compose.compose_id)
installed_pkgs_log = compose.paths.log.log_file("global", "installed-pkgs")
compose.log_info("Logging installed packages to %s" % installed_pkgs_log)
try:
with open(installed_pkgs_log, "w") as f:
subprocess.Popen(["rpm", "-qa"], stdout=f)
except Exception as e:
compose.log_warning("Failed to log installed packages: %s" % str(e))
compose.read_variants()
# dump the config file