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++