From: Kyr Shatskyy Date: Wed, 16 Apr 2025 14:41:54 +0000 (+0200) Subject: task/install/rpm: drop code duplication for extra_system_packages X-Git-Tag: 1.2.2~24^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2045%2Fhead;p=teuthology.git 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 --- 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