public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Adam Williamson <adamwill@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/plasma-discover] rawhide: Backport MR #1443 to fix RHBZ #2480694
Date: Fri, 23 Oct 2026 00:45:32 GMT [thread overview]
Message-ID: <179271633272.1.6678162300200878251.rpms-plasma-discover-3017c55942d5@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/plasma-discover
Branch : rawhide
Commit : 3017c55942d53222081ef1cc7868acf9127035f9
Author : Adam Williamson <adamwill@fedoraproject.org>
Date : 2026-10-20T13:56:26-07:00
Stats : +72/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/plasma-discover/c/3017c55942d53222081ef1cc7868acf9127035f9?branch=rawhide
Log:
Backport MR #1443 to fix RHBZ #2480694
---
diff --git a/0001-PackageKitBackend-always-return-highest-versioned-av.patch b/0001-PackageKitBackend-always-return-highest-versioned-av.patch
new file mode 100644
index 0000000..d8cd291
--- /dev/null
+++ b/0001-PackageKitBackend-always-return-highest-versioned-av.patch
@@ -0,0 +1,64 @@
+From dd43490456805dfde4efb500800a3578cffc78b7 Mon Sep 17 00:00:00 2001
+From: Adam Williamson <adamwill@fedoraproject.org>
+Date: Mon, 19 Oct 2026 17:02:17 -0700
+Subject: [PATCH] PackageKitBackend: always return highest versioned
+ availablePackageId
+
+When the m_packages struct contains multiple package IDs,
+PackageKitResource::availablePackageId() has always just made an
+assumption about which one to return. Before 9572f935 it assumed
+the last one was the right one. Since 9572f935 it assumes the first
+one is the right one.
+
+I don't think any assumption is a good idea, here. The current
+assumption seems to be incorrect, per
+https://bugzilla.redhat.com/show_bug.cgi?id=2480694 and my
+investigation in comment 13. Just flipping back to assuming the
+last ID is the right one doesn't seem like a good idea.
+
+Instead, let's actually iterate over the available IDs, get the
+version for each one, and return the one with the highest version.
+
+This should fix things so we don't install old versions when
+multiple versions are available from different repositories.
+
+Signed-off-by: Adam Williamson <adamwill@fedoraproject.org>
+---
+ .../PackageKitBackend/PackageKitResource.cpp | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/libdiscover/backends/PackageKitBackend/PackageKitResource.cpp b/libdiscover/backends/PackageKitBackend/PackageKitResource.cpp
+index cb3411eb5..57a3f0dc1 100644
+--- a/libdiscover/backends/PackageKitBackend/PackageKitResource.cpp
++++ b/libdiscover/backends/PackageKitBackend/PackageKitResource.cpp
+@@ -12,6 +12,7 @@
+ #include "appstream/AppStreamUtils.h"
+ #include "config-paths.h"
+ #include <AppStreamQt/spdx.h>
++#include <AppStreamQt/utils.h>
+ #include <KIO/ApplicationLauncherJob>
+ #include <KLocalizedString>
+ #include <KService>
+@@ -72,7 +73,18 @@ QString PackageKitResource::availablePackageId() const
+
+ const auto it = m_packages.constFind(PackageKit::Transaction::InfoAvailable);
+ if (it != m_packages.constEnd()) {
+- return it->first();
++ // find highest versioned entry
++ QString highest;
++ QVector<QString> pkgstocheck = it->archPkgIds;
++ if (it->archPkgIds.isEmpty()) {
++ pkgstocheck = it->nonarchPkgIds;
++ }
++ for (const QString &val : pkgstocheck) {
++ if (highest.isEmpty() || AppStream::Utils::vercmpSimple(PackageKit::Daemon::packageVersion(val), PackageKit::Daemon::packageVersion(highest)) > 0) {
++ highest = val;
++ }
++ }
++ return highest;
+ }
+ return installedPackageId();
+ }
+--
+2.55.0
+
diff --git a/plasma-discover.spec b/plasma-discover.spec
index 07c1a35..51cd048 100644
--- a/plasma-discover.spec
+++ b/plasma-discover.spec
@@ -9,7 +9,7 @@
Name: plasma-discover
Summary: KDE and Plasma resources management GUI
Version: 6.7.5
-Release: 1%{?dist}
+Release: 2%{?dist}
License: BSD-3-Clause AND CC0-1.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-3.0-only AND (GPL-2.0-only OR GPL-3.0-only) AND (LGPL-2.1-only OR LGPL-3.0-only)
URL: https://invent.kde.org/plasma/discover
@@ -29,6 +29,10 @@ Source10: discoverrc
Patch200: discover-pk-refresh-timer.patch
## upstreamable patches
+# https://invent.kde.org/plasma/discover/-/merge_requests/1443
+# https://bugzilla.redhat.com/show_bug.cgi?id=2480694
+# make sure we install the highest available version of apps
+Patch201: 0001-PackageKitBackend-always-return-highest-versioned-av.patch
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
@@ -312,6 +316,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.kde.discover.desk
%{_kf6_qtplugindir}/discover/kns-backend.so
%changelog
+* Tue Oct 20 2026 Adam Williamson <adamwill@fedoraproject.org> - 6.7.5-2
+- Backport MR #1443 to fix RHBZ #2480694
+
* Tue Sep 08 2026 Steve Cossette <farchord@gmail.com> - 6.7.5-1
- 6.7.5
reply other threads:[~2026-10-23 0:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179271633272.1.6678162300200878251.rpms-plasma-discover-3017c55942d5@fedoraproject.org \
--to=adamwill@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox