#1 Reset module streams on F32 distro upgrade
Merged 4 years ago by adamwill. Opened 4 years ago by sgallagh.
rpms/ sgallagh/PackageKit f31_reset_modules  into  f31

@@ -0,0 +1,36 @@ 

+ From af44f91f3948fefca191a738bcc7b834a8ca7f09 Mon Sep 17 00:00:00 2001

+ From: Stephen Gallagher <sgallagh@redhat.com>

+ Date: Thu, 12 Mar 2020 15:32:23 -0400

+ Subject: [PATCH] Reset all module streams on upgrade to Fedora 32

+ 

+ Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>

+ ---

+  backends/dnf/pk-backend-dnf.c | 12 ++++++++++++

+  1 file changed, 12 insertions(+)

+ 

+ diff --git a/backends/dnf/pk-backend-dnf.c b/backends/dnf/pk-backend-dnf.c

+ index 503a6eb0ab4162f3f3eba60741e28d5c1f4bb21d..d6da0a0b16d8bd63ddd13d095e57135e116a8d85 100644

+ --- a/backends/dnf/pk-backend-dnf.c

+ +++ b/backends/dnf/pk-backend-dnf.c

+ @@ -3428,6 +3428,18 @@ pk_backend_upgrade_system_thread (PkBackendJob *job, GVariant *params, gpointer

+  	/* set the installonly limit one higher than usual to avoid removing any kernels during system upgrades */

+  	dnf_sack_set_installonly_limit (sack, dnf_context_get_installonly_limit (job_data->context) + 1);

+  

+ +	/* Downstream hack to forcibly reset module defaults when upgrading

+ +	 * to Fedora 32.

+ +	 */

+ +	if (g_strcmp0 (release_ver, "32") == 0) {

+ +		ret = dnf_context_reset_all_modules (job_data->context, sack, &error);

+ +		if (!ret) {

+ +			g_debug ("failed to reset all modules: %s", error->message);

+ +			pk_backend_job_error_code (job, error->code, "%s", error->message);

+ +			return;

+ +		}

+ +	}

+ +

+  	/* done */

+  	if (!dnf_state_done (job_data->state, &error)) {

+  		pk_backend_job_error_code (job, error->code, "%s", error->message);

+ -- 

+ 2.24.1

+ 

file modified
+7 -1
@@ -14,7 +14,7 @@ 

  Summary:   Package management service

  Name:      PackageKit

  Version:   1.1.12

- Release:   12%{?dist}

+ Release:   13%{?dist}

  License:   GPLv2+ and LGPLv2+

  URL:       http://www.freedesktop.org/software/PackageKit/

  Source0:   http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz
@@ -43,6 +43,9 @@ 

  # https://github.com/hughsie/PackageKit/pull/330

  Patch4:    0001-Do-not-trigger-an-inotity-event-when-the-AppStream-X.patch

  

+ # https://bugzilla.redhat.com/show_bug.cgi?id=1767351

+ Patch5:    0001-Reset-all-module-streams-on-upgrade-to-Fedora-32.patch

+ 

  BuildRequires: glib2-devel >= %{glib2_version}

  BuildRequires: xmlto

  BuildRequires: gtk-doc
@@ -343,6 +346,9 @@ 

  %{_datadir}/vala/vapi/packagekit-glib2.vapi

  

  %changelog

+ * Thu Mar 12 2020 Stephen Gallagher <sgallagh@redhat.com> - 1.1.12-13

+ - Reset all module streams when upgrading to Fedora 32 (#1804564)

+ 

  * Tue Aug 13 2019 Richard Hughes <rhughes@redhat.com> - 1.1.12-12

  - Fix rpmdb permission of transaction database file

  

Addresses BZ #1804564

Signed-off-by: Stephen Gallagher sgallagh@redhat.com

We need to decide for sure exactly what releases this should apply to, but 'only 32' is the safest choice to start with, we can tweak later. Tested with the matching libdnf change, appears to work. Merging.

Pull-Request has been merged by adamwill

4 years ago