Hello community,

here is the log from the commit of package PackageKit for openSUSE:Factory 
checked in at 2014-06-18 22:04:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/PackageKit (Old)
 and      /work/SRC/openSUSE:Factory/.PackageKit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "PackageKit"

Changes:
--------
--- /work/SRC/openSUSE:Factory/PackageKit/PackageKit.changes    2014-05-05 
21:18:32.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.PackageKit.new/PackageKit.changes       
2014-06-18 22:04:43.000000000 +0200
@@ -1,0 +2,7 @@
+Fri Jun  6 14:58:02 CEST 2014 - [email protected]
+
+- Add PackageKit-zypp-filter-uninstalled-packages.patch. GStreamer
+  codec installation would prompt to install already installed
+  packages. This patch fixes the issue. Part of fate#316921.
+
+-------------------------------------------------------------------

New:
----
  PackageKit-zypp-filter-uninstalled-packages.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ PackageKit.spec ++++++
--- /var/tmp/diff_new_pack.DpcUzR/_old  2014-06-18 22:04:45.000000000 +0200
+++ /var/tmp/diff_new_pack.DpcUzR/_new  2014-06-18 22:04:45.000000000 +0200
@@ -35,6 +35,8 @@
 Patch2:         0002-Build-against-npapi-sdk-instead-of-xulrunner.patch
 # PATCH-FIX-UPSTREAM PackageKit-dbus-location.patch bnc#829944 
[email protected] -- Look for dbus socket in /run instead of /var/run. Sent 
to upstream.
 Patch3:         PackageKit-dbus-location.patch
+# PATCH-FIX-OPENSUSE PackageKit-zypp-filter-uninstalled-packages.patch 
fate#316921 [email protected] -- GStreamer codec installation would prompt to 
install already installed packages.
+Patch4:         PackageKit-zypp-filter-uninstalled-packages.patch
 # To update this package, please git-format-patch the tag of the
 # tarball version (eg: PACKAGEKIT_0_6_19) vs the distro tag (eg: 
openSUSE_Factory)
 # in https://github.com/openSUSE/PackageKit and keep the patches
@@ -257,6 +259,7 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 translation-update-upstream
 
 %build

++++++ PackageKit-zypp-filter-uninstalled-packages.patch ++++++
diff --git a/backends/zypp/pk-backend-zypp.cpp 
b/backends/zypp/pk-backend-zypp.cpp
index 6a06f07..8794536 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -3466,6 +3466,7 @@ backend_what_provides_thread (PkBackendJob *job, GVariant 
*params, gpointer user
                gchar **search = pk_backend_what_provides_decompose (job,
                                                                     provides,
                                                                     values);
+               GHashTable *installed_hash = g_hash_table_new (g_str_hash, 
g_str_equal);
                
                guint len = g_strv_length (search);
                for (guint i=0; i<len; i++) {
@@ -3474,13 +3475,28 @@ backend_what_provides_thread (PkBackendJob *job, 
GVariant *params, gpointer user
                        sat::WhatProvides prov (cap);
                        
                        for (sat::WhatProvides::const_iterator it = prov.begin 
(); it != prov.end (); ++it) {
+                               if (it->isSystem ())
+                                       g_hash_table_insert (installed_hash,
+                                                            (const gpointer) 
make<ResObject>(*it)->summary().c_str (),
+                                                            GUINT_TO_POINTER 
(1));
+                       }
+
+                       for (sat::WhatProvides::const_iterator it = prov.begin 
(); it != prov.end (); ++it) {
                                if (zypp_filter_solvable (_filters, *it))
                                        continue;
-                               
+
+                               /* If caller asked for uninstalled packages, 
filter out uninstalled instances from
+                                * remote repos corresponding to locally 
installed packages */
+                               if ((_filters & pk_bitfield_value 
(PK_FILTER_ENUM_NOT_INSTALLED)) &&
+                                   g_hash_table_contains (installed_hash, 
make<ResObject>(*it)->summary().c_str ()))
+                                       continue;
+
                                PkInfoEnum info = it->isSystem () ? 
PK_INFO_ENUM_INSTALLED : PK_INFO_ENUM_AVAILABLE;
                                zypp_backend_package (job, info, *it,  
make<ResObject>(*it)->summary().c_str ());
                        }
                }
+
+               g_hash_table_unref (installed_hash);
        }
        pk_backend_job_finished (job);
 }
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to