Hello community,

here is the log from the commit of package PackageKit for openSUSE:Factory 
checked in at 2014-10-29 21:09:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-10-19 
19:27:32.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.PackageKit.new/PackageKit.changes       
2014-10-29 21:09:20.000000000 +0100
@@ -1,0 +2,36 @@
+Wed Oct 22 11:00:10 UTC 2014 - dle1...@leuenberger.net
+
+- Add PackageKit-zypp-progress-info.patch: Pass more progress
+  information from libzypp to PackageKit. This results in PK having
+  accurate information about overall download and install progress,
+  making all UIs profit from this (instead of just writing
+  'Installing packages', they can now show a progress bar. Clients
+  like pkcon and gnome-packagekit already use this information if
+  provided. Also offline-update propagates the information to
+  plymouth.
+
+-------------------------------------------------------------------
+Tue Oct 21 12:35:15 UTC 2014 - dims...@opensuse.org
+
+- Update to version 1.0.1:
+  + New Feature: Add a KeepCache config parameter.
+  + Bugfixes:
+    - Do not install the python helpers unless required.
+    - Don't assume systemd is found if --with-systemdsystemunitdir
+      is passed.
+    - Fall back to /usr/lib/os-release if /etc/os-release does not
+      exist.
+    - Fix compile when the systemd headers are not located in
+      /usr/include.
+    - Never allow cancelling a transaction twice.
+    - Overwrite an existing link for
+      packagekit-offline-update.service.
+  + Backends:
+    - ZYpp:
+      . Be more specific with the progress status messages.
+      . Ensure to reach 100% on complete cache_refresh.
+      . Fix compiler warning.
+    - Fixes in apm, hif and urpmi backends.
+- Drop PackageKit-offline-update.patch: fixed upstream.
+
+-------------------------------------------------------------------

Old:
----
  PackageKit-1.0.0.tar.xz
  PackageKit-offline-update.patch

New:
----
  PackageKit-1.0.1.tar.xz
  PackageKit-zypp-progress-info.patch

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

Other differences:
------------------
++++++ PackageKit.spec ++++++
--- /var/tmp/diff_new_pack.5oqVhE/_old  2014-10-29 21:09:21.000000000 +0100
+++ /var/tmp/diff_new_pack.5oqVhE/_new  2014-10-29 21:09:21.000000000 +0100
@@ -21,7 +21,7 @@
 %define with_offline_updates 1
 
 Name:           PackageKit
-Version:        1.0.0
+Version:        1.0.1
 Release:        0
 Summary:        Simple software installation management software
 License:        GPL-2.0+
@@ -34,8 +34,8 @@
 Patch1:         0001-Change-the-configuration-of-the-cron-script-to-a-sys.patch
 # PATCH-FIX-UPSTREAM PackageKit-dbus-location.patch bnc#829944 
dims...@opensuse.org -- Look for dbus socket in /run instead of /var/run. Sent 
to upstream.
 Patch3:         PackageKit-dbus-location.patch
-# PATCH-FIX-UPSTREAM PackageKit-offline-update.patch dims...@opensuse.org -- 
Make packagekit-offline-update a static service for system-update.target
-Patch4:         PackageKit-offline-update.patch
+# PATCH-FEATURE-UPSTREAM PackageKit-zypp-progress-info.patch boo#863735 
dims...@opensuse.org -- Pass overall progress information to PackageKitd.
+Patch4:         PackageKit-zypp-progress-info.patch
 BuildRequires:  NetworkManager-devel
 BuildRequires:  automake
 BuildRequires:  docbook-utils
@@ -343,7 +343,6 @@
 %dir %{_datadir}/PackageKit/helpers
 %dir %{_datadir}/PackageKit/helpers/test_spawn
 %dir %{_libdir}/packagekit-backend
-%dir %{python_sitelib}/packagekit
 %dir %{_localstatedir}/lib/PackageKit
 %{_datadir}/bash-completion/completions/pkcon
 %{_sysconfdir}/cron.daily/packagekit-background.cron
@@ -360,7 +359,6 @@
 %if %BUILD_CNF
 %{_libexecdir}/pk-command-not-found
 %endif
-%{python_sitelib}/packagekit/*
 %{_datadir}/dbus-1/interfaces/org.freedesktop.PackageKit.Transaction.xml
 %{_datadir}/dbus-1/interfaces/org.freedesktop.PackageKit.xml
 %{_datadir}/PackageKit/helpers/test_spawn/search-name.sh

++++++ PackageKit-1.0.0.tar.xz -> PackageKit-1.0.1.tar.xz ++++++
++++ 27305 lines of diff (skipped)

++++++ PackageKit-zypp-progress-info.patch ++++++
>From 0b7108ba11d87ea74e8e6de6abe50a641d1516d6 Mon Sep 17 00:00:00 2001
From: Dominique Leuenberger <dims...@opensuse.org>
Date: Wed, 22 Oct 2014 10:24:06 +0200
Subject: [PATCH] zypp: Improve progress status

The ZYpp backend gained support for 'overall progress status' during
* download
* install
phases.

This makes the experience in most UIs much better, as they can give
proper feedback. The previous progress only updated each ITEM (so,
package xxx progress) as opposed to the overall progress.
---
 backends/zypp/pk-backend-zypp.cpp | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/backends/zypp/pk-backend-zypp.cpp 
b/backends/zypp/pk-backend-zypp.cpp
index 7a969c8..c4767e6 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -148,6 +148,11 @@ gchar * _repoName;
  */
 gboolean _updating_self = FALSE;
 
+/* We need to track the number of packages to download in global scope */
+guint _dl_count = 0;
+guint _dl_progress = 0;
+guint _dl_status = 0;
+
 /**
  * Build a package_id from the specified resolvable.  The returned
  * gchar * should be freed with g_free ().
@@ -243,6 +248,12 @@ struct InstallResolvableReportReceiver : public 
zypp::callback::ReceiveReport<zy
 
        virtual void start (zypp::Resolvable::constPtr resolvable) {
                clear_package_id ();
+
+               /* This is the first package we see coming as INSTALLING - 
resetting counter and modus */
+               if (_dl_status != PK_INFO_ENUM_INSTALLING) {
+                       _dl_progress = 0;
+                       _dl_status = PK_INFO_ENUM_INSTALLING;
+               }
                _package_id = zypp_build_package_id_from_resolvable 
(resolvable->satSolvable ());
                MIL << resolvable << " " << _package_id << std::endl;
                gchar* summary = 
g_strdup(zypp::asKind<zypp::ResObject>(resolvable)->summary().c_str ());
@@ -269,8 +280,10 @@ struct InstallResolvableReportReceiver : public 
zypp::callback::ReceiveReport<zy
 
        virtual void finish (zypp::Resolvable::constPtr resolvable, Error 
error, const std::string &reason, RpmLevel level) {
                MIL << reason << " " << _package_id << " " << resolvable << 
std::endl;
+               pk_backend_job_set_percentage(_job, (double)++_dl_progress / 
_dl_count * 100);
                if (_package_id != NULL) {
                        //pk_backend_job_package (_backend, 
PK_INFO_ENUM_INSTALLED, _package_id, "TODO: Put the package summary here if 
possible");
+                       update_sub_percentage (100, PK_STATUS_ENUM_INSTALL);
                        clear_package_id ();
                }
        }
@@ -356,6 +369,11 @@ struct DownloadProgressReportReceiver : public 
zypp::callback::ReceiveReport<zyp
        {
                MIL << resolvable << " " << file << std::endl;
                clear_package_id ();
+               /* This is the first package we see coming as INSTALLING - 
resetting counter and modus */
+               if (_dl_status != PK_INFO_ENUM_DOWNLOADING) {
+                       _dl_progress = 0;
+                       _dl_status = PK_INFO_ENUM_DOWNLOADING;
+               }
                _package_id = zypp_build_package_id_from_resolvable 
(resolvable->satSolvable ());
                gchar* summary = 
g_strdup(zypp::asKind<zypp::ResObject>(resolvable)->summary().c_str ());
 
@@ -381,6 +399,7 @@ struct DownloadProgressReportReceiver : public 
zypp::callback::ReceiveReport<zyp
        {
                MIL << resolvable << " " << error << " " << _package_id << 
std::endl;
                update_sub_percentage (100, PK_STATUS_ENUM_DOWNLOAD);
+               pk_backend_job_set_percentage(_job, (double)++_dl_progress / 
_dl_count * 100);
                clear_package_id ();
        }
 };
@@ -1364,7 +1383,9 @@ zypp_perform_execution (PkBackendJob *job, ZYpp::Ptr 
zypp, PerformType type, gbo
 
                // Gather up any dependencies
                pk_backend_job_set_status (job, PK_STATUS_ENUM_DEP_RESOLVE);
+               pk_backend_job_set_percentage(job, 0);
                zypp->resolver ()->setIgnoreAlreadyRecommended (TRUE);
+               pk_backend_job_set_percentage(job, 100);
                if (!zypp->resolver ()->resolvePool ()) {
                        // Manual intervention required to resolve dependencies
                        // TODO: Figure out what we need to do with PackageKit
@@ -1400,12 +1421,18 @@ zypp_perform_execution (PkBackendJob *job, ZYpp::Ptr 
zypp, PerformType type, gbo
                switch (type) {
                case INSTALL:
                        pk_backend_job_set_status (job, PK_STATUS_ENUM_INSTALL);
+                       pk_backend_job_set_percentage(job, 0);
+                       _dl_progress = 0;
                        break;
                case REMOVE:
                        pk_backend_job_set_status (job, PK_STATUS_ENUM_REMOVE);
+                       pk_backend_job_set_percentage(job, 0);
+                       _dl_progress = 0;
                        break;
                case UPDATE:
                        pk_backend_job_set_status (job, PK_STATUS_ENUM_UPDATE);
+                       pk_backend_job_set_percentage(job, 0);
+                       _dl_progress = 0;
                        break;
                }
 
@@ -1441,7 +1468,10 @@ zypp_perform_execution (PkBackendJob *job, ZYpp::Ptr 
zypp, PerformType type, gbo
 
                // look for licenses to confirm
 
+               _dl_count = 0;
                for (ResPool::const_iterator it = pool.begin (); it != pool.end 
(); ++it) {
+                       if (it->status ().isToBeInstalled ())
+                               _dl_count++;
                        if (it->status ().isToBeInstalled () && 
!(it->resolvable()->licenseToConfirm().empty ())) {
                                gchar *eula_id = g_strdup ((*it)->name ().c_str 
());
                                gboolean has_eula = pk_backend_is_eula_valid 
(backend, eula_id);
@@ -1506,6 +1536,7 @@ zypp_perform_execution (PkBackendJob *job, ZYpp::Ptr 
zypp, PerformType type, gbo
                        goto exit;
                }
 
+               pk_backend_job_set_percentage(job, 100);
                ret = TRUE;
        } catch (const repo::RepoNotFoundException &ex) {
                pk_backend_job_error_code (job, PK_ERROR_ENUM_REPO_NOT_FOUND, 
ex.asUserString().c_str() );
-- 
2.1.2

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

Reply via email to