From 0515c4df2485559af08e68fa8438986052ed6c63 Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Wed, 16 Apr 2025 16:41:54 +0200 Subject: [PATCH] task/install/rpm: drop code duplication for extra_system_packages After introducing install_ceph_packages option there is added new extra_system_packages list append instruction which made adding the packages twice if the option is set to False. So we just drop the first attempt to update install package list. Fixes: 0177823 Signed-off-by: Kyr Shatskyy --- teuthology/task/install/rpm.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/teuthology/task/install/rpm.py b/teuthology/task/install/rpm.py index 0c3e697b1..6a8999800 100644 --- a/teuthology/task/install/rpm.py +++ b/teuthology/task/install/rpm.py @@ -179,17 +179,8 @@ def _update_package_list_and_install(ctx, remote, rpm, config): remote.run(args=['sudo', 'dnf', '-y', 'install', 'dnf-command(copr)']) for copr in enable_coprs: remote.run(args=['sudo', 'dnf', '-y', 'copr', 'enable', copr]) - packages = list(rpm) - # rpm does not force installation of a particular version of the project - # packages, so we can put extra_system_packages together with the rest - system_pkglist = config.get('extra_system_packages') - if system_pkglist: - if isinstance(system_pkglist, dict): - packages += system_pkglist.get('rpm') - else: - packages += system_pkglist - remote_os = remote.os + remote_os = remote.os dist_release = remote_os.name log.debug("_update_package_list_and_install: config is {}".format(config)) repos = config.get('repos') @@ -214,6 +205,7 @@ def _update_package_list_and_install(ctx, remote, rpm, config): log.info("repos_only was specified: not installing any packages") return None + packages = list(rpm) if not install_ceph_packages: log.info("install_ceph_packages set to False: not installing Ceph packages") # Although "librados2" is an indirect dependency of ceph-test, we -- 2.47.3