From 453272c645eebeb661872858c33747edc185c3ceab4e6d0923885089189d4f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Mon, 19 Aug 2019 07:48:38 +0000 Subject: [PATCH] Accepting request 724424 from home:JonathanKang:branches:GNOME:Factory - Add PackageKit-zypp-fix-what-provides-newest-filter.patch: zypp: Add support for newest filter in what-provides(bsc#984865, gh#hughsie/PackageKit#335). OBS-URL: https://build.opensuse.org/request/show/724424 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/PackageKit?expand=0&rev=355 --- ...zypp-fix-what-provides-newest-filter.patch | 24 +++++++++++++++++++ PackageKit.changes | 7 ++++++ PackageKit.spec | 3 +++ 3 files changed, 34 insertions(+) create mode 100644 PackageKit-zypp-fix-what-provides-newest-filter.patch diff --git a/PackageKit-zypp-fix-what-provides-newest-filter.patch b/PackageKit-zypp-fix-what-provides-newest-filter.patch new file mode 100644 index 0000000..fcb93e4 --- /dev/null +++ b/PackageKit-zypp-fix-what-provides-newest-filter.patch @@ -0,0 +1,24 @@ +Index: PackageKit-1.1.12/backends/zypp/pk-backend-zypp.cpp +=================================================================== +--- PackageKit-1.1.12.orig/backends/zypp/pk-backend-zypp.cpp ++++ PackageKit-1.1.12/backends/zypp/pk-backend-zypp.cpp +@@ -1113,6 +1113,19 @@ zypp_filter_solvable (PkBitfield filters + return TRUE; + if (i == PK_FILTER_ENUM_NOT_DOWNLOADED && zypp_package_is_cached (item)) + return TRUE; ++ if (i == PK_FILTER_ENUM_NEWEST) { ++ if (item.isSystem ()) { ++ return FALSE; ++ } ++ else { ++ ui::Selectable::Ptr sel = ui::Selectable::get (item); ++ const PoolItem & newest (sel->highestAvailableVersionObj ()); ++ ++ if (newest && zypp::Edition::compare (newest.edition (), item.edition ())) ++ return TRUE; ++ return FALSE; ++ } ++ } + + // FIXME: add more enums - cf. libzif logic and pk-enum.h + // PK_FILTER_ENUM_SUPPORTED, diff --git a/PackageKit.changes b/PackageKit.changes index 48b2a5d..d3f999c 100644 --- a/PackageKit.changes +++ b/PackageKit.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Aug 19 01:10:01 UTC 2019 - Jonathan Kang + +- Add PackageKit-zypp-fix-what-provides-newest-filter.patch: + zypp: Add support for newest filter in what-provides(bsc#984865, + gh#hughsie/PackageKit#335). + ------------------------------------------------------------------- Wed Aug 14 01:32:01 UTC 2019 - Jonathan Kang diff --git a/PackageKit.spec b/PackageKit.spec index 555a0f5..c2b838c 100644 --- a/PackageKit.spec +++ b/PackageKit.spec @@ -53,6 +53,8 @@ Patch5: PackageKit-remove-polkit-rules.patch Patch6: zypp-perform-actions-disallowed-by-update-in-upgrade-mode.patch # PATCH-FIX-UPSTREAM PackageKit-zypp-fix-newest-filter.patch bsc#1137019 gh#hughsie/PackageKit#329 sckang@suse.com -- zypp: Emit installed package for newest filter Patch7: PackageKit-zypp-fix-newest-filter.patch +# PATCH-FIX-UPSTREAM PackageKit-zypp-fix-what-provides-newest-filter.patch bsc#984865, gh#hughsie/PackageKit#335 sckang@suse.com -- zypp: Add support for newest filter in what-provides +Patch8: PackageKit-zypp-fix-what-provides-newest-filter.patch BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: gobject-introspection-devel @@ -244,6 +246,7 @@ This package provides the upstream default configuration for PackageKit. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 translation-update-upstream %build