Skip to content

Commit 94f665a

Browse files
ppisarm-blaha
authored andcommitted
Do not disable dnf-automatic.timer when upgrading to dnf5-plugin-automatic
Both dnf-automatic and dnf5-plugin-automatic packages deliver dnf-automatic.timer. When upgrading from dnf to dnf5, dnf-automatic's preun script saw that dnf-automatic package was being uninstalled and hence disabled dnf-automatic.timer. As a result upgrading people found the upgraded system without automatically applied updates. It is supposed that people who have enabled dnf-automatic.timer want to keep it enabled even after migrating to DNF5. This patch stops disabling dnf-automatic.timer when dnf-automatic package is uinstalled and there is dnf5-automatic.timer. Existence of dnf5-automatic.timer means that dnf5-plugin-automatic is installed. The new dnf-automatic.timer is a symbolic link to dnf5-automatic.timer and both names can be used interchangably by systemd. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2358865
1 parent d91b81e commit 94f665a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dnf.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,10 @@ popd
314314
%systemd_post dnf-automatic.timer dnf-automatic-notifyonly.timer dnf-automatic-download.timer dnf-automatic-install.timer
315315

316316
%preun automatic
317-
%systemd_preun dnf-automatic.timer dnf-automatic-notifyonly.timer dnf-automatic-download.timer dnf-automatic-install.timer
317+
if [ ! -e %{_unitdir}/dnf5-automatic.timer ]; then
318+
%systemd_preun dnf-automatic.timer
319+
fi
320+
%systemd_preun dnf-automatic-notifyonly.timer dnf-automatic-download.timer dnf-automatic-install.timer
318321

319322
%postun automatic
320323
%systemd_postun_with_restart dnf-automatic.timer dnf-automatic-notifyonly.timer dnf-automatic-download.timer dnf-automatic-install.timer

0 commit comments

Comments
 (0)