diff --git a/0001-Reset-all-module-when-system-upgrade-to-f31-32-RhBug-1767351.patch b/0001-Reset-all-module-when-system-upgrade-to-f31-32-RhBug-1767351.patch deleted file mode 100644 index c2adfb5..0000000 --- a/0001-Reset-all-module-when-system-upgrade-to-f31-32-RhBug-1767351.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 53f4e99c05382a003fbd42753f55707e6d16f974 Mon Sep 17 00:00:00 2001 -From: Jaroslav Mracek -Date: Fri, 18 Oct 2019 10:54:09 +0200 -Subject: [PATCH] Reset all module when system-upgrade to f31, 32 - (RhBug:1767351) - -This is a downstream hack that resolves distribution issue with missing -upgrade path between dist versions. - -The module reset is not applied to offline-distrosing and -offline-upgrade commands. It will allow to users to disable automatic -reset of modules with the same functionality. - -https://bugzilla.redhat.com/show_bug.cgi?id=1767351 ---- - plugins/system_upgrade.py | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/plugins/system_upgrade.py b/plugins/system_upgrade.py -index 0a0a0d7..402daa3 100644 ---- a/plugins/system_upgrade.py -+++ b/plugins/system_upgrade.py -@@ -535,6 +535,16 @@ def run_reboot(self): - reboot() - - def run_download(self): -+ # downstream hack to narrow missing upgrade path with modules between dist versions -+ if self.opts.command not in ['offline-upgrade', 'offline-distrosync']: -+ if dnf.base.WITH_MODULES: -+ module_base = dnf.module.module_base.ModuleBase(self.base) -+ try: -+ module_base.reset(["*"]) -+ except dnf.exceptions.MarkingErrors: -+ # When no module is available, just pass -+ pass -+ - # Mark everything in the world for upgrade/sync - if self.opts.distro_sync: - self.base.distro_sync() diff --git a/0001-Reset-all-modules-on-system-upgrade-RhBug-1767351.patch b/0001-Reset-all-modules-on-system-upgrade-RhBug-1767351.patch new file mode 100644 index 0000000..d14a67b --- /dev/null +++ b/0001-Reset-all-modules-on-system-upgrade-RhBug-1767351.patch @@ -0,0 +1,58 @@ +From 6ccd70735f592e5d74625d4baa9dfbb9b89e8af4 Mon Sep 17 00:00:00 2001 +From: Jaroslav Mracek +Date: Fri, 6 Mar 2020 18:51:10 -0800 +Subject: [PATCH] Reset all modules on system-upgrade (RhBug:1767351) + +This is a downstream hack that resolves distribution issue with missing +upgrade path between dist versions. + +The module reset is not applied to offline-distrosync and +offline-upgrade commands. It will allow to users to disable automatic +reset of modules with the same functionality. + +https://bugzilla.redhat.com/show_bug.cgi?id=1767351 +--- + plugins/system_upgrade.py | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/plugins/system_upgrade.py b/plugins/system_upgrade.py +index a132a76..2a889a3 100644 +--- a/plugins/system_upgrade.py ++++ b/plugins/system_upgrade.py +@@ -561,6 +561,16 @@ class SystemUpgradeCommand(dnf.cli.Command): + reboot() + + def run_download(self): ++ # downstream hack to narrow missing upgrade path with modules between dist versions ++ if self.opts.command not in ['offline-upgrade', 'offline-distrosync']: ++ if dnf.base.WITH_MODULES: ++ module_base = dnf.module.module_base.ModuleBase(self.base) ++ try: ++ module_base.reset(["*"]) ++ except dnf.exceptions.MarkingErrors: ++ # When no module is available, just pass ++ pass ++ + # Mark everything in the world for upgrade/sync + if self.opts.distro_sync: + self.base.distro_sync() +@@ -574,6 +584,16 @@ class SystemUpgradeCommand(dnf.cli.Command): + state.destdir = self.base.conf.destdir + + def run_upgrade(self): ++ # downstream hack to narrow missing upgrade path with modules between dist versions ++ if self.opts.command not in ['offline-upgrade', 'offline-distrosync']: ++ if dnf.base.WITH_MODULES: ++ module_base = dnf.module.module_base.ModuleBase(self.base) ++ try: ++ module_base.reset(["*"]) ++ except dnf.exceptions.MarkingErrors: ++ # When no module is available, just pass ++ pass ++ + # change the upgrade status (so we can detect crashed upgrades later) + command = '' + with self.state as state: +-- +2.25.1 + diff --git a/dnf-plugins-extras.spec b/dnf-plugins-extras.spec index bef8773..cf5e0dd 100644 --- a/dnf-plugins-extras.spec +++ b/dnf-plugins-extras.spec @@ -15,13 +15,13 @@ Name: dnf-plugins-extras Version: 4.0.8 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Extras Plugins for DNF License: GPLv2+ URL: https://github.com/rpm-software-management/%{name} Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz # This is a downstream hack that resolves distribution issue with missing upgrade path between dist versions. -Patch1: 0001-Reset-all-module-when-system-upgrade-to-f31-32-RhBug-1767351.patch +Patch1: 0001-Reset-all-modules-on-system-upgrade-RhBug-1767351.patch BuildArch: noarch BuildRequires: cmake @@ -445,6 +445,9 @@ PYTHONPATH="%{buildroot}%{python3_sitelib}:%{buildroot}%{python3_sitelib}/dnf-pl %endif %changelog +* Fri Mar 06 2020 Adam Williamson - 4.0.8-4 +- Tweak module reset patch to also do reset in `run_upgrade` (RhBug:1767351) + * Fri Mar 06 2020 Ales Matej - 4.0.8-3 - Fix patch to fix distribution issues with missing upgrade path between dist versions (RhBug:1767351)