From e68edf805818db2994c7be2db6aea96cab7bc8f5 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Apr 12 2024 17:19:53 +0000 Subject: Backport MR #1949 to fix upgrading --- diff --git a/0001-fedora-pkgdb-collections-Incorrect-state-set-on-the-.patch b/0001-fedora-pkgdb-collections-Incorrect-state-set-on-the-.patch new file mode 100644 index 0000000..88e0522 --- /dev/null +++ b/0001-fedora-pkgdb-collections-Incorrect-state-set-on-the-.patch @@ -0,0 +1,62 @@ +From cd0743032edccfad47d2253b87daebd01b0ee2e1 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Fri, 12 Apr 2024 07:57:14 +0200 +Subject: [PATCH] fedora-pkgdb-collections: Incorrect state set on the upgrade + app + +The "updatable" state means "downloaded locally, ready to be installed", which +is not the case here. The upgrade is either "available" (to be downloaded), or +"unavailable" (end of life). The other states are determined by the other plugins. + +Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2514 +--- + .../gs-plugin-fedora-pkgdb-collections.c | 23 +++---------------- + 1 file changed, 3 insertions(+), 20 deletions(-) + +diff --git a/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c b/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c +index 2983defaa..15d3c385a 100644 +--- a/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c ++++ b/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c +@@ -393,18 +393,10 @@ _create_upgrade_from_info (GsPluginFedoraPkgdbCollections *self, + + /* create */ + app = gs_app_new (app_id); +- switch (item->status) { +- case PKGDB_ITEM_STATUS_ACTIVE: +- case PKGDB_ITEM_STATUS_DEVEL: +- gs_app_set_state (app, GS_APP_STATE_UPDATABLE); +- break; +- case PKGDB_ITEM_STATUS_EOL: ++ if (item->status == PKGDB_ITEM_STATUS_EOL) + gs_app_set_state (app, GS_APP_STATE_UNAVAILABLE); +- break; +- default: ++ else + gs_app_set_state (app, GS_APP_STATE_AVAILABLE); +- break; +- } + gs_app_set_kind (app, AS_COMPONENT_KIND_OPERATING_SYSTEM); + gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE); + gs_app_set_name (app, GS_APP_QUALITY_LOWEST, item->name); +@@ -729,17 +721,8 @@ refine_app (GsPluginFedoraPkgdbCollections *self, + return TRUE; + + /* fix the state */ +- switch (item->status) { +- case PKGDB_ITEM_STATUS_ACTIVE: +- case PKGDB_ITEM_STATUS_DEVEL: +- gs_app_set_state (app, GS_APP_STATE_UPDATABLE); +- break; +- case PKGDB_ITEM_STATUS_EOL: ++ if (item->status == PKGDB_ITEM_STATUS_EOL) + gs_app_set_state (app, GS_APP_STATE_UNAVAILABLE); +- break; +- default: +- break; +- } + + return TRUE; + } +-- +2.44.0 + diff --git a/gnome-software.spec b/gnome-software.spec index dad1e93..eeb1db9 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -24,13 +24,18 @@ Name: gnome-software Version: 46.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPL-2.0-or-later URL: https://apps.gnome.org/Software Source0: https://download.gnome.org/sources/gnome-software/46/%{name}-%{tarball_version}.tar.xz +# https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2514 +# https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/1949 +# Fix incorrect upgrade state (breaks upgrade process) +Patch: 0001-fedora-pkgdb-collections-Incorrect-state-set-on-the-.patch + # ostree and flatpak not on i686 for RHEL 10 # https://github.com/containers/composefs/pull/229#issuecomment-1838735764 %if 0%{?rhel} >= 10 @@ -264,6 +269,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Fri Apr 12 2024 Adam Williamson - 46.0-2 +- Backport MR #1949 to fix upgrading + * Mon Mar 18 2024 Milan Crha - 46.0-1 - Update to 46.0