Hello community,

here is the log from the commit of package gnome-packagekit for 
openSUSE:Factory checked in at 2013-09-09 09:53:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-packagekit (Old)
 and      /work/SRC/openSUSE:Factory/.gnome-packagekit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gnome-packagekit"

Changes:
--------
--- /work/SRC/openSUSE:Factory/gnome-packagekit/gnome-packagekit.changes        
2013-05-16 10:50:52.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.gnome-packagekit.new/gnome-packagekit.changes   
2013-09-09 09:53:52.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Aug 14 14:48:03 UTC 2013 - [email protected]
+
+- Add gnome-packagekit-spinner.patch: Fix gnome-packagekit
+  'hanging' for a long time after executing the update and
+  consuming CPU resources (bnc#813176).
+
+-------------------------------------------------------------------

New:
----
  gnome-packagekit-spinner.patch

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

Other differences:
------------------
++++++ gnome-packagekit.spec ++++++
--- /var/tmp/diff_new_pack.3xqQfb/_old  2013-09-09 09:53:54.000000000 +0200
+++ /var/tmp/diff_new_pack.3xqQfb/_new  2013-09-09 09:53:54.000000000 +0200
@@ -34,6 +34,8 @@
 Patch1:         gnome-packagekit-OnlyShowIn.patch
 # PATCH-FIX-UPSTREAM gnome-packagekit-larger-details-pane.patch bnc#730971 
bgo#666635 badshah400@gmailcom -- Make the details pane in the update viewer 
larger (patch came from Gary, pushed to upstream bug)
 Patch2:         gnome-packagekit-larger-details-pane.patch
+# PATCH-FIX-UPSTREAM gnome-packagekit-spinner.patch bnc#813176 
[email protected] -- Fix gnome-packagekit 'hanging' for a long time after 
executing the update and consuming CPU resources; taken from git.
+Patch3:         gnome-packagekit-spinner.patch
 BuildRequires:  PackageKit-devel
 BuildRequires:  desktop-file-utils
 BuildRequires:  docbook-utils-minimal
@@ -89,6 +91,7 @@
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %configure \

++++++ gnome-packagekit-spinner.patch ++++++
>From 4077ba3ea30354ef070d640a5af4b6a913e97f4b Mon Sep 17 00:00:00 2001
From: Richard Hughes <[email protected]>
Date: Tue, 18 Jun 2013 12:56:05 +0000
Subject: Ignore package progress updates when the transaction is being simulated

PackageKit backends do not have to issue INFO_FINISHED when simulating, and most
don't bother. As we didn't special-case simulation, we set up the activity
spinner on the Package(INFO_UPDATING) event and do not cancel the signal.

This leaves every row in the update viewer with a spinning cursor, which due to
the way the code was structured lead to an O(n*n) exposion of updates to the
cell renderers for each update. For a dozen or so updates it was not noticable,
and nobody noticed the slight increase of CPU usage.

Now that TeX Live has officially jumped the shark and has many hundreds of
sub-packages, it's quite plausible to have *thousands* of small packages to
update. This means that the O(n*n) bug stops being a minor increase in CPU and
starts to use the CPU at 100% for many hours before completing.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=969852
---
Index: gnome-packagekit-3.8.2/src/gpk-update-viewer.c
===================================================================
--- gnome-packagekit-3.8.2.orig/src/gpk-update-viewer.c
+++ gnome-packagekit-3.8.2/src/gpk-update-viewer.c
@@ -841,6 +841,7 @@ gpk_update_viewer_progress_cb (PkProgres
        gchar *text;
        gint percentage;
        GtkWidget *widget;
+       guint64 transaction_flags;
        PkInfoEnum info;
        PkRoleEnum role;
        PkStatusEnum status;
@@ -853,6 +854,7 @@ gpk_update_viewer_progress_cb (PkProgres
                      "percentage", &percentage,
                      "package", &package,
                      "allow-cancel", &allow_cancel,
+                     "transaction-flags", &transaction_flags,
                      NULL);
 
        if (type == PK_PROGRESS_TYPE_PACKAGE) {
@@ -864,6 +866,10 @@ gpk_update_viewer_progress_cb (PkProgres
                GtkTreePath *path;
                gboolean scroll;
 
+               /* ignore simulation phase */
+               if (pk_bitfield_contain (transaction_flags, 
PK_TRANSACTION_FLAG_ENUM_SIMULATE))
+                       goto out;
+
                /* add the results, not the progress */
                if (role == PK_ROLE_ENUM_GET_UPDATES)
                        return;
@@ -1040,6 +1046,10 @@ gpk_update_viewer_progress_cb (PkProgres
                guint size_display;
                PkItemProgress *item_progress;
 
+               /* ignore simulation phase */
+               if (pk_bitfield_contain (transaction_flags, 
PK_TRANSACTION_FLAG_ENUM_SIMULATE))
+                       goto out;
+
                g_object_get (progress,
                              "item-progress", &item_progress,
                              NULL);
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to