From 14d8d21ed6eb1e52ec95b61217501813061bc78d7c7988a74141dd8197c50b43 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Tue, 31 May 2022 07:16:16 +0000 Subject: [PATCH] Accepting request 979408 from home:JonathanKang:branches:GNOME:Factory - Add PackageKit-zypp-locked-packages.patch: zypp: ignore locked packages(gh#hughsie/PackageKit#543, boo#1199895). OBS-URL: https://build.opensuse.org/request/show/979408 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/PackageKit?expand=0&rev=430 --- PackageKit-zypp-locked-packages.patch | 26 ++++++++++++++++++++++++++ PackageKit.changes | 6 ++++++ PackageKit.spec | 4 +++- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 PackageKit-zypp-locked-packages.patch diff --git a/PackageKit-zypp-locked-packages.patch b/PackageKit-zypp-locked-packages.patch new file mode 100644 index 0000000..5901629 --- /dev/null +++ b/PackageKit-zypp-locked-packages.patch @@ -0,0 +1,26 @@ +Index: PackageKit-1.2.5/backends/zypp/pk-backend-zypp.cpp +=================================================================== +--- PackageKit-1.2.5.orig/backends/zypp/pk-backend-zypp.cpp ++++ PackageKit-1.2.5/backends/zypp/pk-backend-zypp.cpp +@@ -1239,13 +1239,19 @@ zypp_get_package_updates (string repo, s + resolver->doUpdate (); + } + +- for (; it != e; ++it) +- if (it->status().isToBeInstalled()) { ++ for (; it != e; ++it) { ++ if (it->status().isLocked()) { ++ // We pretend locked packages are not upgradable at all since ++ // we can't represent the concept of holds in PackageKit. ++ // https://github.com/PackageKit/PackageKit/issues/325 ++ continue; ++ } else if (it->status().isToBeInstalled()) { + ui::Selectable::constPtr s = + ui::Selectable::get((*it)->kind(), (*it)->name()); + if (s->hasInstalledObj()) + pks.insert(*it); + } ++ } + + if (is_tumbleweed ()) { + resolver->setUpgradeMode (FALSE); diff --git a/PackageKit.changes b/PackageKit.changes index 73f81b0..9b1f493 100644 --- a/PackageKit.changes +++ b/PackageKit.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 26 07:25:04 UTC 2022 - Jonathan Kang + +- Add PackageKit-zypp-locked-packages.patch: zypp: ignore locked + packages(gh#hughsie/PackageKit#543, boo#1199895). + ------------------------------------------------------------------- Fri May 20 09:01:45 UTC 2022 - Dominique Leuenberger diff --git a/PackageKit.spec b/PackageKit.spec index 3c0ecaa..2130520 100644 --- a/PackageKit.spec +++ b/PackageKit.spec @@ -51,7 +51,9 @@ Patch2: PackageKit-remove-polkit-rules.patch # PATCH-FIX-OPENSUSE PackageKit-dnf-Add-support-for-AppStream-repodata-basenames-use.patch ngompa13@gmail.com -- Band-aid to deal with OBS producing differently named appstream repodata files Patch3: PackageKit-dnf-Add-support-for-AppStream-repodata-basenames-use.patch # PATCH-FIX-UPSTREAM PackageKit-fix-crash-pre-dbus.patch gh#hughsie/PackageKit!436 -- Do not crash when calling pk_dbus_get_uid() before D-Bus is setup -Patch5: PackageKit-fix-crash-pre-dbus.patch +Patch4: PackageKit-fix-crash-pre-dbus.patch +# PATCH-FIX-UPSTREAM PackageKit-zypp-locked-packages.patch gh#hughsie/PackageKit#543, boo#1199895 sckang@suse.com -- zypp: ignore locked packages +Patch5: PackageKit-zypp-locked-packages.patch BuildRequires: fdupes BuildRequires: gcc-c++