Hello community,

here is the log from the commit of package PackageKit for openSUSE:11.4
checked in at Fri May 20 17:25:24 CEST 2011.



--------
--- old-versions/11.4/UPDATES/all/PackageKit/PackageKit.changes 2011-04-29 
13:16:57.000000000 +0200
+++ 11.4/PackageKit/PackageKit.changes  2011-05-20 10:11:14.000000000 +0200
@@ -1,0 +2,105 @@
+Fri May 20 10:10:49 CEST 2011 - meiss...@suse.de
+
+- fixed build with older gtk2.
+
+-------------------------------------------------------------------
+Mon May  9 15:21:17 UTC 2011 - dmacvi...@suse.de
+
+- Add patches:
+  + Add PackageKit backend function name in logging
+    (pk_backend_log):
+    0001-zypp-log-to-ZYpp-s-log-the-start-of-a-PK-backend-fun.patch
+  + Fix for lost package locks (bnc#690038):
+    0002-zypp-fix-deletion-of-package-locks-bnc-690038.patch
+
+-------------------------------------------------------------------
+Fri May  6 10:38:42 CEST 2011 - vu...@opensuse.org
+
+- Update to version 0.6.14:
+  + Lots of nice bugfixes in this release, along with slight
+    changes to the SetProxy() and DownloadPackages() D-Bus API. If
+    you're using either packagekit-glib or packagekit-qt then
+    there's no change required as the libraries have symbol
+    fallbacks.
+  + The packageKit-qt2 library has been committed. It is eventually
+    aiming to replace packagekit-qt.
+  + New Features:
+    - Add a 'store_in_cache' attribute to the DownloadPackages
+      method
+    - Automatically cancel running background transactions if a
+      foreground transaction is committed
+    - Cancel any background transactions when we get
+      SuggestDaemonQuit
+    - Introduce other attributes in the SetProxy() method
+  + Libraries (glib):
+    - Add GIR annotations to make PK GIR usable
+    - Add header name to GIR and set export package
+  + Libraries (qt):
+    - Add storeInCache parameter to downloadPackages to cover new
+      API
+    - Fix typo in SearchGroups
+  + Libraries (qt2):
+    - New library.
+  + Bugfixes:
+    - Fix precedence when assigning strings to a *GStrv
+    - Create transaction db properly if it's not exist
+    - Do not abort in pk_catalog_init() if PackageKit is not
+      available. Fixes rh#688280
+    - Do not allow backends to output duplicate older packages when
+      searching with newest
+    - Fix a crash where the error code was pointing to freed
+      memory. Fixes rh#684464
+    - Fix a typo in pk_transaction_db_get_proxy
+    - Get more proxy info after the new proxy parameters was
+      introduced
+    - Honour ACLOCAL_FLAGS in Makefile.am. Fixes fd#35237
+    - browser-plugin: Remove deprecated symbols
+    - pkcon: add missing {} around if
+    - pk-debuginfo-install: fix typo of using PK_FILTER
+    - Use the new threadsafe signal handling support in GLib
+    - Various docs updates.
+  + Zypp Backend:
+    - Check repo file before using it
+    - Consider only_trusted option while installing packages
+    - Fix memory leak in pk_backend_transaction_start
+    - Patch::Content is returned by value. Fixes crash on
+      get-updates (bnc#685831)
+    - Reload RpmDB before removing packages
+    - Report download speed (bnc#663069)
+    - Reset packages status in repo while removing packages
+    - Set locale info at the begin of transaction
+    - Support proxy_https,proxy_socks,no_proxy
+    - Use namespace once to remove the namespace noise.
+    - Use output parameters (references) for containers
+  + Non-zypp backends updates (including removal of pacman
+    backend).
+- Drop PackageKit-fix-endless-recursion.patch: fixed upstream.
+- Drop PackageKit-fix-build.patch: fixed upstream.
+- Change Requires of "Packagekit = %{version} to Recommends for
+  libpackagekit-glib2-14 and libpackagekit-qt14: a strict Requires
+  like this goes against the goal of the shared library packaging
+  policy. Also, the users of those libraries should gracefully
+  handle the case where the PackageKit daemon is not running or
+  doesn't understand the D-Bus requests.
+- Create libpackagekit-qt2-0 and libpackagekit-qt2-devel subpackage
+  for the new libpackagekit-qt2 library.
+- Remove explicit Requires for packages from various devel
+  subpackages as they will automatically be added the pkgconfig()
+  way:
+  + PackageKit-devel: glib2-devel, NetworkManager-devel,
+    sqlite3-devel
+  + libpackagekit-glib2-devel: glib2-devel, NetworkManager-devel,
+    sqlite3-devel (as well as PackageKit itself)
+  + libpackagekit-qt-devel: libqt4-devel (as well as PackageKit
+    itself)
+- Mark branding-upstream subpackage as noarch.
+- Set BUILD_CNF to 1 as the file search works again. This means the
+  pk-command-not-found utility will be built again.
+
+-------------------------------------------------------------------
+Thu Apr 28 12:27:43 CEST 2011 - vu...@opensuse.org
+
+- Add PackageKit-fix-build.patch to fix build: do not use some
+  deprecated symbol. Taken from git.
+
+-------------------------------------------------------------------
@@ -9,0 +115,33 @@
+
+-------------------------------------------------------------------
+Wed Apr 20 09:46:25 CEST 2011 - dmuel...@suse.de
+
+- Add opensuse-codecs-installer Provides/Obsoletes to
+  gstreamer-plugin subpackage, as it replaces it.
+
+-------------------------------------------------------------------
+Mon Apr  4 15:36:51 UTC 2011 - fcro...@novell.com
+
+- Add gtk3-devel BuildRequires.
+- Create gtk3-module subpackage.
+
+-------------------------------------------------------------------
+Fri Mar 11 16:17:48 UTC 2011 - dmacvi...@suse.de
+
+- Update to version 0.6.13
+  + Libraries:
+    - Allow pk_client_download_packages_async() to be called with
+      no target directory
+    - Port away from PolkitBackendActionLookup to support new
+      versions of PolicyKit
+  + ZYpp Backend:
+    - remove check online in refresh cache
+    - uses the standard system update algorithm from ZYpp. Fixes
+      bnc#637764 (as patch in 0.6.12 package)
+  + Non-zypp backends updates.
+  + Bugfixes:
+    - Add missing python(gio) requirement
+    - Check for polkit_authority_get_sync symbol
+    - Change the connman DBus name
+    - Update for NetworkManager 0.9 snapshots
+- Drop PackageKit-use-system-solve.patch: fixed upstream.

calling whatdependson for 11.4-i586


Old:
----
  0001-Report-download-speed-bnc-663069.patch
  PackageKit-0.6.12.tar.bz2
  PackageKit-fix-endless-recursion.patch
  PackageKit-use-system-solve.patch

New:
----
  0001-zypp-log-to-ZYpp-s-log-the-start-of-a-PK-backend-fun.patch
  0002-zypp-fix-deletion-of-package-locks-bnc-690038.patch
  PackageKit-0.6.14.tar.bz2
  fix-plugin.patch

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

Other differences:
------------------
++++++ PackageKit.spec ++++++
--- /var/tmp/diff_new_pack.rebHqD/_old  2011-05-20 17:24:36.000000000 +0200
+++ /var/tmp/diff_new_pack.rebHqD/_new  2011-05-20 17:24:36.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 # $ pkcon search file /usr/bin/anjuta
-%define BUILD_CNF 0
+%define BUILD_CNF 1
 
 %if 0%{suse_version} > 1130
 %define xulrunner_version 20
@@ -34,8 +34,8 @@
 %endif
 
 Name:           PackageKit
-Version:        0.6.12
-Release:        1.<RELEASE6>
+Version:        0.6.14
+Release:        0.<RELEASE2>
 License:        GPLv2+
 BuildRequires:  NetworkManager-devel
 BuildRequires:  dbus-1-glib-devel
@@ -47,6 +47,7 @@
 BuildRequires:  gstreamer-0_10-plugins-base-devel
 BuildRequires:  gtk-doc
 BuildRequires:  gtk2-devel
+BuildRequires:  gtk3-devel
 BuildRequires:  intltool
 BuildRequires:  libarchive-devel
 BuildRequires:  libcppunit-devel
@@ -65,11 +66,12 @@
 Source:         %{name}-%{version}.tar.bz2
 # PATCH-FEATURE-OPENSUSE PackageKit-sysconfig-cron.patch vu...@opensuse.org -- 
Change the configuration of the cron script to a sysconfig-like config
 Patch0:         PackageKit-sysconfig-cron.patch
-# PATCH-FIX-UPSTREAM PackageKit-use-system-solve.patch bnc#637764 
dmacvi...@suse.de -- uses the standard system update algorithm from ZYpp which 
honours user policies
-Patch1:         PackageKit-use-system-solve.patch
-# PATCH-FIX-UPSTREAM PackageKit-fix-endless-recursion.patch co...@opensuse.org 
-- use correct variable to avoid endless recusion
-Patch2:         PackageKit-fix-endless-recursion.patch
-Patch3:         0001-Report-download-speed-bnc-663069.patch
+# PATCH-FIX-UPSTREAM 
0001-zypp-log-to-ZYpp-s-log-the-start-of-a-PK-backend-fun.patch 
dmacvi...@suse.de -- make debugging easier
+Patch1:         0001-zypp-log-to-ZYpp-s-log-the-start-of-a-PK-backend-fun.patch
+# PATCH-FIX-UPSTREAM 0002-zypp-fix-deletion-of-package-locks-bnc-690038.patch 
dmacvi...@suse.de -- fix lost locks (bnc#690038)
+Patch2:         0002-zypp-fix-deletion-of-package-locks-bnc-690038.patch
+# PATCH-FIX-OPENSUSE fix-plugin.patch meiss...@suse.de -- fix build with 11.4 
gtk2 2.21.
+Patch3:         fix-plugin.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Requires:       %{name}-branding = %{version}
 Recommends:     %{name}-lang
@@ -111,6 +113,10 @@
 Requires(postun): update-alternatives
 Recommends:     %{name} = %{version}
 Supplements:    packageand(%{name}:gstreamer-0_10-plugins-base)
+%if %suse_version > 1130
+Provides:       opensuse-codecs-installer = 10.3.1
+Obsoletes:      opensuse-codecs-installer <= 10.3.1
+%endif
 
 %description gstreamer-plugin
 PackageKit is a system designed to make installing and updating
@@ -133,11 +139,25 @@
 use some of the latest technology like PolicyKit to make the process
 suck less.
 
+%package gtk3-module
+License:        GPLv2+
+Summary:        Simple software installation management software
+Group:          System/Daemons
+Recommends:     %{name} = %{version}
+Supplements:    packageand(%{name}:gtk3)
+
+%description gtk3-module
+PackageKit is a system designed to make installing and updating
+software on your computer easier.  The primary design goal is to unify
+all the software graphical tools used in different distributions, and
+use some of the latest technology like PolicyKit to make the process
+suck less.
+
 %package devel
 License:        GPLv2+
 Summary:        Needed include files and libraries for development
 Requires:       %{name} = %{version}
-Requires:       glib2-devel libpackagekit-glib2-devel NetworkManager-devel 
sqlite3-devel
+Requires:       libpackagekit-glib2-devel
 Group:          System/Daemons
 %if 0%{?suse_version} >= 1120
 BuildArch:      noarch
@@ -152,9 +172,9 @@
 License:        GPLv2+
 Summary:        Simple software installation management software
 Group:          System/Daemons
+Recommends:     %{name}
 Provides:       libpackagekit-glib12 = %{version}
 Obsoletes:      libpackagekit-glib12 < %{version}
-Requires:       %{name} = %{version}
 
 %description -n libpackagekit-glib2-14
 PackageKit is a system designed to make installing and updating
@@ -167,11 +187,9 @@
 License:        GPLv2+
 Summary:        Simple software installation management software
 Group:          System/Daemons
-Requires:       %{name} = %{version}
 Requires:       libpackagekit-glib2-14 = %{version}
 Provides:       libpackagekit-glib12-devel = %{version}
 Obsoletes:      libpackagekit-glib12-devel < %{version}
-Requires:       glib2-devel NetworkManager-devel sqlite3-devel
 
 %description -n libpackagekit-glib2-devel
 PackageKit is a system designed to make installing and updating
@@ -184,7 +202,7 @@
 License:        GPLv2+
 Summary:        Simple software installation management software
 Group:          System/Daemons
-Requires:       %{name} = %{version}
+Recommends:     %{name}
 
 %description -n libpackagekit-qt14
 PackageKit is a system designed to make installing and updating
@@ -197,9 +215,7 @@
 License:        GPLv2+
 Summary:        Simple software installation management software
 Group:          System/Daemons
-Requires:       %{name} = %{version}
 Requires:       libpackagekit-qt14 = %{version}
-Requires:       libqt4-devel
 # Old name of the package; we can't provide it since the ABI has changed
 Obsoletes:      libpackagekit-qt12-devel <= 0.5.4
 
@@ -210,6 +226,32 @@
 use some of the latest technology like PolicyKit to make the process
 suck less.
 
+%package -n libpackagekit-qt2-2
+License:        GPLv2+
+Summary:        Simple software installation management software
+Group:          System/Daemons
+Recommends:     %{name}
+
+%description -n libpackagekit-qt2-2
+PackageKit is a system designed to make installing and updating
+software on your computer easier.  The primary design goal is to unify
+all the software graphical tools used in different distributions, and
+use some of the latest technology like PolicyKit to make the process
+suck less.
+
+%package -n libpackagekit-qt2-devel
+License:        GPLv2+
+Summary:        Simple software installation management software
+Group:          System/Daemons
+Requires:       libpackagekit-qt2-2 = %{version}
+
+%description -n libpackagekit-qt2-devel
+PackageKit is a system designed to make installing and updating
+software on your computer easier.  The primary design goal is to unify
+all the software graphical tools used in different distributions, and
+use some of the latest technology like PolicyKit to make the process
+suck less.
+
 %package doc
 License:        GPLv2+
 Summary:        Simple software installation management software
@@ -233,6 +275,7 @@
 Supplements:    packageand(%{name}:branding-upstream)
 Provides:       %{name}-branding = %{version}
 Conflicts:      otherproviders(%{name}-branding)
+BuildArch:      noarch
 #BRAND: Provide configuration files -
 #BRAND: /etc/PackageKit/*
 
@@ -299,10 +342,14 @@
 
 %post -n libpackagekit-qt14 -p /sbin/ldconfig
 
+%post -n libpackagekit-qt2-2 -p /sbin/ldconfig
+
 %postun -n libpackagekit-glib2-14 -p /sbin/ldconfig
 
 %postun -n libpackagekit-qt14 -p /sbin/ldconfig
 
+%postun -n libpackagekit-qt2-2 -p /sbin/ldconfig
+
 %files lang -f %{name}.lang
 
 %files
@@ -340,7 +387,6 @@
 %if %BUILD_CNF
 %{_libexecdir}/pk-command-not-found
 %endif
-%{_libdir}/polkit-1/extensions/libpackagekit-action-lookup.so
 %{python_sitelib}/packagekit/*
 %{_sbindir}/pk-device-rebind
 %{_datadir}/mime/packages/packagekit-*.xml
@@ -364,6 +410,10 @@
 %defattr(-,root,root)
 %{_libdir}/gtk-2.0/modules/*
 
+%files gtk3-module
+%defattr(-,root,root)
+%{_libdir}/gtk-3.0/modules/*
+
 %files doc
 %defattr(-,root,root)
 %{_datadir}/PackageKit/website
@@ -399,11 +449,21 @@
 %{_libdir}/libpackagekit-qt.so
 %{_libdir}/pkgconfig/packagekit-qt.pc
 %dir %{_includedir}/PackageKit
-%dir %{_includedir}/PackageKit/packagekit-qt
-%{_includedir}/PackageKit/packagekit-qt/*
+%{_includedir}/PackageKit/packagekit-qt/
 %dir %{_datadir}/cmake
 %{_datadir}/cmake/Modules/*
 
+%files -n libpackagekit-qt2-2
+%defattr(-,root,root)
+%{_libdir}/libpackagekit-qt2.so.*
+
+%files -n libpackagekit-qt2-devel
+%defattr(-,root,root)
+%{_libdir}/libpackagekit-qt2.so
+%{_libdir}/pkgconfig/packagekit-qt2.pc
+%dir %{_includedir}/PackageKit
+%{_includedir}/PackageKit/packagekit-qt2/
+
 %files branding-upstream
 %defattr(-,root,root)
 %if %BUILD_CNF

++++++ 0001-zypp-log-to-ZYpp-s-log-the-start-of-a-PK-backend-fun.patch ++++++
>From ad3ce3e90b50c2b6e50306831cb4c502eb870c34 Mon Sep 17 00:00:00 2001
From: Duncan Mac-Vicar P <dmacvi...@suse.de>
Date: Fri, 6 May 2011 16:00:30 +0200
Subject: [PATCH 1/2] zypp: log to ZYpp's log the start of a PK backend function 
to ease debugging

---
 backends/zypp/pk-backend-zypp.cpp |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/backends/zypp/pk-backend-zypp.cpp 
b/backends/zypp/pk-backend-zypp.cpp
index 3968f01..51bb3e4 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -29,6 +29,7 @@
 #include <glib/gi18n.h>
 #include <sys/vfs.h>
 
+#include <zypp/base/Logger.h>
 #include <zypp/ZYppFactory.h>
 #include <zypp/ResObject.h>
 #include <zypp/ResPoolProxy.h>
@@ -145,6 +146,7 @@ pk_backend_destroy (PkBackend *backend)
 static gboolean
 backend_get_requires_thread (PkBackend *backend)
 {
+       MIL << endl;
        gchar **package_ids;
        PkBitfield _filters = (PkBitfield) pk_backend_get_uint (backend, 
"filters");
        ZYpp::Ptr zypp;
@@ -307,6 +309,7 @@ zypp_is_no_solvable (const sat::Solvable &solv)
 static gboolean
 backend_get_depends_thread (PkBackend *backend)
 {
+       MIL << endl;
        gchar **package_ids;
        PkBitfield _filters = (PkBitfield) pk_backend_get_uint (backend, 
"filters");
 
@@ -481,6 +484,7 @@ pk_backend_get_depends (PkBackend *backend, PkBitfield 
filters, gchar **package_
 static gboolean
 backend_get_details_thread (PkBackend *backend)
 {
+       MIL << endl;
        gchar **package_ids;
        ZYpp::Ptr zypp;
 
@@ -587,6 +591,7 @@ pk_backend_get_details (PkBackend *backend, gchar 
**package_ids)
 static gboolean
 backend_get_distro_upgrades_thread(PkBackend *backend)
 {
+       MIL << endl;
        ZYpp::Ptr zypp;
 
        zypp = get_zypp (backend);
@@ -642,6 +647,7 @@ pk_backend_get_distro_upgrades (PkBackend *backend)
 static gboolean
 backend_refresh_cache_thread (PkBackend *backend)
 {
+       MIL << endl;
        gboolean force = pk_backend_get_bool(backend, "force");
        zypp_refresh_cache (backend, force);
        pk_backend_finished (backend);
@@ -654,6 +660,7 @@ backend_refresh_cache_thread (PkBackend *backend)
 void
 pk_backend_refresh_cache (PkBackend *backend, gboolean force)
 {
+       MIL << endl;
        pk_backend_thread_create (backend, backend_refresh_cache_thread);
 }
 
@@ -686,6 +693,7 @@ check_for_self_update (PkBackend *backend, set<PoolItem> 
*candidates)
 static gboolean
 backend_get_updates_thread (PkBackend *backend)
 {
+       MIL << endl;
        PkBitfield _filters = (PkBitfield) pk_backend_get_uint (backend, 
"filters");
        ZYpp::Ptr zypp;
 
@@ -765,6 +773,7 @@ pk_backend_get_updates (PkBackend *backend, PkBitfield 
filters)
 static gboolean
 backend_install_files_thread (PkBackend *backend)
 {
+       MIL << endl;
        gchar **full_paths;
        ZYpp::Ptr zypp;
 
@@ -903,6 +912,7 @@ pk_backend_simulate_install_files (PkBackend *backend, 
gchar **full_paths)
 static gboolean
 backend_get_update_detail_thread (PkBackend *backend)
 {
+       MIL << endl;
        gchar **package_ids;
        ZYpp::Ptr zypp;
 
@@ -1001,6 +1011,7 @@ pk_backend_get_update_detail (PkBackend *backend, gchar 
**package_ids)
 static gboolean
 backend_update_system_thread (PkBackend *backend)
 {
+       MIL << endl;
        ZYpp::Ptr zypp;
 
        zypp = get_zypp (backend);
@@ -1313,6 +1324,7 @@ pk_backend_simulate_remove_packages (PkBackend *backend, 
gchar **packages, gbool
 static gboolean
 backend_resolve_thread (PkBackend *backend)
 {
+       MIL << endl;
        gchar **package_ids = pk_backend_get_strv (backend, "package_ids");
        PkBitfield _filters = (PkBitfield) pk_backend_get_uint (backend, 
"filters");
        ZYpp::Ptr zypp;
@@ -1396,6 +1408,7 @@ pk_backend_resolve (PkBackend *backend, PkBitfield 
filters, gchar **package_ids)
 static gboolean
 backend_find_packages_thread (PkBackend *backend)
 {
+       MIL << endl;
        gchar **values;
        const gchar *search;
        guint mode;
@@ -1490,6 +1503,7 @@ pk_backend_search_details (PkBackend *backend, PkBitfield 
filters, gchar **value
 static gboolean
 backend_search_group_thread (PkBackend *backend)
 {
+       MIL << endl;
        gchar **values;
        const gchar *group;
        ZYpp::Ptr zypp;
@@ -1560,6 +1574,7 @@ pk_backend_search_files (PkBackend *backend, PkBitfield 
filters, gchar **values)
 void
 pk_backend_get_repo_list (PkBackend *backend, PkBitfield filters)
 {
+       MIL << endl;
        ZYpp::Ptr zypp;
 
        zypp = get_zypp (backend);
@@ -1606,6 +1621,7 @@ pk_backend_get_repo_list (PkBackend *backend, PkBitfield 
filters)
 void
 pk_backend_repo_enable (PkBackend *backend, const gchar *rid, gboolean enabled)
 {
+       MIL << endl;
        ZYpp::Ptr zypp;
 
        zypp = get_zypp (backend);
@@ -1647,6 +1663,7 @@ pk_backend_repo_enable (PkBackend *backend, const gchar 
*rid, gboolean enabled)
 static gboolean
 backend_get_files_thread (PkBackend *backend)
 {
+       MIL << endl;
        gchar **package_ids;
        ZYpp::Ptr zypp;
 
@@ -1731,6 +1748,7 @@ pk_backend_get_files(PkBackend *backend, gchar 
**package_ids)
 static gboolean
 backend_get_packages_thread (PkBackend *backend)
 {
+       MIL << endl;
        ZYpp::Ptr zypp;
 
        zypp = get_zypp (backend);
@@ -1835,6 +1853,7 @@ pk_backend_simulate_update_packages (PkBackend *backend, 
gchar **package_ids)
 static gboolean
 backend_repo_set_data_thread (PkBackend *backend)
 {
+       MIL << endl;
        const gchar *repo_id;
        const gchar *parameter;
        const gchar *value;
@@ -1977,6 +1996,7 @@ pk_backend_repo_set_data (PkBackend *backend, const gchar 
*repo_id, const gchar
 static gboolean
 backend_what_provides_thread (PkBackend *backend)
 {
+       MIL << endl;
        ZYpp::Ptr zypp;
 
        zypp = get_zypp (backend);
@@ -2060,6 +2080,7 @@ pk_backend_get_mime_types (PkBackend *backend)
 static gboolean
 backend_download_packages_thread (PkBackend *backend)
 {
+       MIL << endl;
        gchar **package_ids;
        gulong size = 0;
 
-- 
1.7.3.4

++++++ 0002-zypp-fix-deletion-of-package-locks-bnc-690038.patch ++++++
>From e9ed00089de47e64090af65f42c9eba1e8eee0d4 Mon Sep 17 00:00:00 2001
From: Duncan Mac-Vicar P <dmacvi...@suse.de>
Date: Fri, 6 May 2011 16:12:37 +0200
Subject: [PATCH 2/2] zypp: fix deletion of package locks (bnc#690038)

Save and restore Pool status when doing calculations like
in get_depends and get_requires.

Fixes bug introduced by commit:
"zypp: reset packages status in repo while removing packages" which
resetted the status of an item, including its locks.

So if you browse a locked package, see if requires, the reset done
after removed the locks, and if you installed a package later, this was
saved.
---
 backends/zypp/pk-backend-zypp.cpp |   79 +++++++++++++++++--------------------
 1 files changed, 36 insertions(+), 43 deletions(-)

diff --git a/backends/zypp/pk-backend-zypp.cpp 
b/backends/zypp/pk-backend-zypp.cpp
index 51bb3e4..85b7cbb 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -84,6 +84,22 @@ static map<PkBackend *, EventDirector *> _eventDirectors;
 
 map<PkBackend *, vector<string> *> _signatures;
 
+// helper function to restore the pool status
+// after doing operations on it
+class PoolStatusSaver : private base::NonCopyable
+{
+public:
+    PoolStatusSaver()
+    {
+           ResPool::instance().proxy().saveState();
+    }
+
+    ~PoolStatusSaver()
+    {
+           ResPool::instance().proxy().restoreState();
+    }
+};
+
 /**
  * pk_backend_get_description:
  */
@@ -168,6 +184,7 @@ backend_get_requires_thread (PkBackend *backend)
        //TODO repair percentages
        //pk_backend_set_percentage (backend, 0);
 
+       PoolStatusSaver saver;
        for (uint i = 0; package_ids[i]; i++) {
                sat::Solvable solvable = zypp_get_package_by_id (backend, 
package_ids[i]);
                PoolItem package;
@@ -231,12 +248,8 @@ backend_get_requires_thread (PkBackend *backend)
 
                        if (!error && !zypp_filter_solvable (_filters, 
it->resolvable()->satSolvable()))
                                error = !zypp_backend_pool_item_notify 
(backend, *it);
-
-                       it->statusReset ();
                }
 
-               // undo the status-change of the package and disable 
forceResolve
-               package.statusReset ();
                solver.setForceResolve (false);
        }
 
@@ -775,6 +788,7 @@ backend_install_files_thread (PkBackend *backend)
 {
        MIL << endl;
        gchar **full_paths;
+       RepoManager manager;
        ZYpp::Ptr zypp;
 
        zypp = get_zypp (backend);
@@ -825,63 +839,36 @@ backend_install_files_thread (PkBackend *backend)
                tmpRepo.setAutorefresh (true);
                tmpRepo.setAlias ("PK_TMP_DIR");
                tmpRepo.setName ("PK_TMP_DIR");
-               zypp_build_pool (backend, true);
 
                // add Repo to pool
-
-               RepoManager manager;
                manager.addRepository (tmpRepo);
 
-               if (!zypp_refresh_meta_and_cache (manager, tmpRepo))
-                       return FALSE;
+               if (!zypp_refresh_meta_and_cache (manager, tmpRepo)) {
+                       return zypp_backend_finished_error (
+                         backend, PK_ERROR_ENUM_INTERNAL_ERROR, "Can't refresh 
repositories");
+               }
+               zypp_build_pool (backend, true);
 
-       } catch (const url::UrlException &ex) {
-               return zypp_backend_finished_error (
-                       backend, PK_ERROR_ENUM_INTERNAL_ERROR, ex.asUserString 
().c_str ());
        } catch (const Exception &ex) {
                return zypp_backend_finished_error (
                        backend, PK_ERROR_ENUM_INTERNAL_ERROR, ex.asUserString 
().c_str ());
        }
 
        bool error = false;
-       for (guint i = 0; full_paths[i]; i++) {
-
-               Pathname rpmPath (full_paths[i]);
-               target::rpm::RpmHeader::constPtr rpmHeader = 
target::rpm::RpmHeader::readPackage (rpmPath, 
target::rpm::RpmHeader::NOSIGNATURE);
 
-               // look for the packages and set them to toBeInstalled
-               vector<sat::Solvable> solvables;
-               zypp_get_packages_by_name (backend, rpmHeader->tag_name 
().c_str (), ResKind::package, solvables, TRUE);
-               PoolItem *item = NULL;
-
-               gboolean found = FALSE;
-
-               for (vector<sat::Solvable>::iterator it = solvables.begin (); 
it != solvables.end (); it ++) {
-                      if (it->repository ().alias () == "PK_TMP_DIR") {
-                              item = new PoolItem(*it);
-                              found = TRUE;
-                              break;
-                      }
-               }
+       Repository repo = ResPool::instance().reposFind("PK_TMP_DIR");
 
-               if (!found) {
-                       error = true;
-                       pk_backend_error_code (backend, 
PK_ERROR_ENUM_INTERNAL_ERROR, "Could not find the rpm-Package in Pool");
-               } else if (!error) {
-                       ResStatus status = item->status ().setToBeInstalled 
(ResStatus::USER);
-               }
-               if (!error && !zypp_perform_execution (backend, INSTALL, 
FALSE)) {
-                       error = true;
-                       pk_backend_error_code (backend, 
PK_ERROR_ENUM_LOCAL_INSTALL_FAILED, "Could not install the rpm-file.");
-               }
+       for_(it, repo.solvablesBegin(), repo.solvablesEnd()){
+               MIL << "Setting " << *it << " for installation" << endl;
+               PoolItem(*it).status().setToBeInstalled(ResStatus::USER);
+       }
 
-               item->statusReset ();
-               delete (item);
+       if (!zypp_perform_execution (backend, INSTALL, FALSE)) {
+               pk_backend_error_code (backend, 
PK_ERROR_ENUM_LOCAL_INSTALL_FAILED, "Could not install the rpm-file.");
        }
 
        // remove tmp-dir and the tmp-repo
        try {
-               RepoManager manager;
                manager.removeRepository (tmpRepo);
        } catch (const repo::RepoNotFoundException &ex) {
                pk_backend_error_code (backend, PK_ERROR_ENUM_REPO_NOT_FOUND, 
ex.asUserString().c_str() );
@@ -1070,6 +1057,8 @@ pk_backend_update_system (PkBackend *backend, gboolean 
only_trusted)
 static gboolean
 backend_install_packages_thread (PkBackend *backend)
 {
+       MIL << endl;
+       PoolStatusSaver saver;
        gchar **package_ids;
 
        // refresh the repos before installing packages
@@ -1230,6 +1219,8 @@ pk_backend_install_signature (PkBackend *backend, 
PkSigTypeEnum type, const gcha
 static gboolean
 backend_remove_packages_thread (PkBackend *backend)
 {
+       MIL << endl;
+       PoolStatusSaver saver;
        gboolean autoremove;
        gchar **package_ids;
        vector<PoolItem> *items = new vector<PoolItem> ();
@@ -1783,6 +1774,8 @@ pk_backend_get_packages (PkBackend *backend, PkBitfield 
filter)
 static gboolean
 backend_update_packages_thread (PkBackend *backend)
 {
+       MIL << endl;
+       PoolStatusSaver saver;
        gboolean retval;
        gchar **package_ids;
        ZYpp::Ptr zypp;
-- 
1.7.3.4

++++++ PackageKit-0.6.12.tar.bz2 -> PackageKit-0.6.14.tar.bz2 ++++++
old-versions/11.4/UPDATES/all/PackageKit/PackageKit-0.6.12.tar.bz2 
11.4/PackageKit/PackageKit-0.6.14.tar.bz2 differ: char 11, line 1

++++++ fix-plugin.patch ++++++
Index: PackageKit-0.6.14/contrib/browser-plugin/pk-main.c
===================================================================
--- PackageKit-0.6.14.orig/contrib/browser-plugin/pk-main.c
+++ PackageKit-0.6.14/contrib/browser-plugin/pk-main.c
@@ -219,7 +219,7 @@ pk_main_create_window (PkPlugin *plugin)
                }
 
                /* get parent */
-               parent = gdk_x11_window_foreign_new_for_display (gdk_display, 
xwindow);
+               parent = gdk_window_foreign_new_for_display (gdk_display, 
xwindow);
                if (parent == NULL) {
                        pk_debug ("invalid window given for setup (id %lu)\n", 
xwindow);
                        return;

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



Remember to have fun...

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to