From fd61dc231fbf67a31124481983954b0700a4fdda Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Tue, 17 Sep 2024 11:38:59 -0500 Subject: [PATCH] Don't autoremove packages on dnf package uninstall --- shared/macros/10-bash.jinja | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shared/macros/10-bash.jinja b/shared/macros/10-bash.jinja index 5e0b8dc61ed..36eab6193d7 100644 --- a/shared/macros/10-bash.jinja +++ b/shared/macros/10-bash.jinja @@ -483,7 +483,12 @@ if rpm -q --quiet "{{{ package }}}" ; then {{% if SSG_TEST_SUITE_ENV %}} rpm -e --nodeps "{{{ package }}}" {{% else %}} - {{{ pkg_manager }}} remove -y "{{{ package }}}" + {{%- if pkg_manager == "dnf" -%}} + dnf remove -y --noautoremove "{{{ package }}}" + {{%- else -%}} + {{{ pkg_manager }}} remove -y "{{{ package }}}" + {{%- endif -%}} + {{% endif %}} fi {{%- elif pkg_manager == "apt_get" -%}}