- Don't try to run all the committed transactions at once with a deep

queue.
- This fixes the bug where the dispatcher would sometimes fail to run the
    next method and PkSpawn would warn the user with 'timeout already set'.
This commit is contained in:
Richard Hughes 2008-09-23 11:20:27 +00:00
parent c40f999abf
commit 1c79fda99e
2 changed files with 38 additions and 1 deletions

View File

@ -8,7 +8,7 @@
Summary: System daemon that is a DBUS abstraction layer for package management
Name: PackageKit
Version: 0.3.4
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://packagekit.freedesktop.org
@ -18,6 +18,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# upstream: c9a01198d494f06ae9e0b3e2a002f941da118f00
Patch0: pk-dont-send-finished-from-dispatcher.patch
# upstream: 95a2dcf78ba0e2ae6262bfae897a16b0e26408c8
Patch1: pk-dont-schedule-the-whole-queue.patch
Requires: dbus >= %{dbus_version}
Requires: dbus-glib >= %{dbus_glib_version}
Requires: PackageKit-libs = %{version}-%{release}
@ -143,6 +146,7 @@ using PackageKit.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
%configure --enable-yum --enable-smart --with-default-backend=yum --disable-local
@ -273,6 +277,11 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_includedir}/*
%changelog
* Tue Sep 23 2008 Richard Hughes <rhughes@redhat.com> - 0.3.4-3
- Don't try to run all the committed transactions at once with a deep queue.
- This fixes the bug where the dispatcher would sometimes fail to run the
next method and PkSpawn would warn the user with 'timeout already set'.
* Tue Sep 23 2008 Richard Hughes <rhughes@redhat.com> - 0.3.4-2
- Don't send ::Finished when the script exits because of a dispatcher exit.
- This only seems to happen when we are making the dispatcher be reloaded

View File

@ -0,0 +1,28 @@
commit 95a2dcf78ba0e2ae6262bfae897a16b0e26408c8
Author: Richard Hughes <richard@hughsie.com>
Date: Tue Sep 23 11:43:36 2008 +0100
bugfix: when we have more than one transaction queued, don't try to run them all at once
This bug was never triggered before as we were running each pk_transaction_run in a loop
and so blocked at this point. Now we are idle_add'ing them, it's possible for all of
the remaining queue to be dispatched at the same time.
This fixes the bug where the dispatcher would sometimes fail to run the second method
and PkSpawn would error out with 'trying to set timeout when already set'.
diff --git a/src/pk-transaction-list.c b/src/pk-transaction-list.c
index d8da409..23bbcf0 100644
--- a/src/pk-transaction-list.c
+++ b/src/pk-transaction-list.c
@@ -293,8 +293,10 @@
item = (PkTransactionItem *) g_ptr_array_index (tlist->priv->array, i);
if (item->committed &&
!item->running &&
- !item->finished)
+ !item->finished) {
pk_transaction_list_run_item (tlist, item);
+ break;
+ }
}
}