- 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
from multiple sessions with different locales.
This commit is contained in:
parent
9a5ec9b7d4
commit
c40f999abf
@ -8,15 +8,15 @@
|
||||
Summary: System daemon that is a DBUS abstraction layer for package management
|
||||
Name: PackageKit
|
||||
Version: 0.3.4
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://packagekit.freedesktop.org
|
||||
Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
# upstream: 51b020dca500141a6e78ab549765f09a34ac75fc
|
||||
#Patch0: pk-upgrades-mistake.patch
|
||||
# upstream: c9a01198d494f06ae9e0b3e2a002f941da118f00
|
||||
Patch0: pk-dont-send-finished-from-dispatcher.patch
|
||||
|
||||
Requires: dbus >= %{dbus_version}
|
||||
Requires: dbus-glib >= %{dbus_glib_version}
|
||||
@ -142,7 +142,7 @@ using PackageKit.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
#%patch0 -p1
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%configure --enable-yum --enable-smart --with-default-backend=yum --disable-local
|
||||
@ -273,6 +273,11 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
|
||||
%{_includedir}/*
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
from multiple sessions with different locales.
|
||||
|
||||
* Mon Sep 22 2008 Richard Hughes <rhughes@redhat.com> - 0.3.4-1
|
||||
- New upstream version
|
||||
|
||||
|
||||
30
pk-dont-send-finished-from-dispatcher.patch
Normal file
30
pk-dont-send-finished-from-dispatcher.patch
Normal file
@ -0,0 +1,30 @@
|
||||
commit c9a01198d494f06ae9e0b3e2a002f941da118f00
|
||||
Author: Richard Hughes <richard@hughsie.com>
|
||||
Date: Tue Sep 23 10:45:23 2008 +0100
|
||||
|
||||
bugfix: don't send ::Finished() when the script exits because of a dispatcher exit
|
||||
|
||||
What we are seeing here is the backend being finished when it is in another transaction
|
||||
and hence returns no results and then puts up warnings that there was no status reports.
|
||||
This only seems to happen when we are making the dispatcher be reloaded again and again,
|
||||
for instance using pk-import-specspo and a RefreshCache() at the same time
|
||||
|
||||
diff --git a/src/pk-backend-spawn.c b/src/pk-backend-spawn.c
|
||||
index 5609580..9878340 100644
|
||||
--- a/src/pk-backend-spawn.c
|
||||
+++ b/src/pk-backend-spawn.c
|
||||
@@ -409,8 +409,12 @@ pk_backend_spawn_exit_cb (PkSpawn *spawn, PkSpawnExitType exit, PkBackendSpawn *
|
||||
|
||||
/* only emit if not finished */
|
||||
if (!backend_spawn->priv->finished) {
|
||||
- egg_debug ("script exited without doing finished");
|
||||
- pk_backend_finished (backend_spawn->priv->backend);
|
||||
+ /* ignore when we exit from a dispatcher */
|
||||
+ if (exit != PK_SPAWN_EXIT_TYPE_DISPATCHER_EXIT &&
|
||||
+ exit != PK_SPAWN_EXIT_TYPE_DISPATCHER_CHANGED) {
|
||||
+ egg_warning ("script exited without doing finished");
|
||||
+ pk_backend_finished (backend_spawn->priv->backend);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
commit 0f2fa1f265aa0e7922d5acf03e1266081345df58
|
||||
Author: Richard Hughes <hughsie@localhost.localdomain>
|
||||
Date: Wed Sep 17 10:28:13 2008 +0100
|
||||
|
||||
yum: bugfix: don't try and upgrade kernel when we want to upgrade the preupgrade package
|
||||
|
||||
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
|
||||
index e3f07c1..cfbc17d 100755
|
||||
--- a/backends/yum/yumBackend.py
|
||||
+++ b/backends/yum/yumBackend.py
|
||||
@@ -1397,7 +1397,7 @@ class PackageKitYumBackend(PackageKitBaseBackend,PackagekitPackage):
|
||||
elif len(pkgs) == 1:
|
||||
# check if there are any updates to the preupgrade package
|
||||
po = pkgs[0]
|
||||
- pkgs = self.yumbase.pkgSack.returnNewestByName(name='kernel')
|
||||
+ pkgs = self.yumbase.pkgSack.returnNewestByName(name='preupgrade')
|
||||
if pkgs:
|
||||
newest = pkgs[0]
|
||||
if newest.EVR > po.EVR:
|
||||
@ -1,34 +0,0 @@
|
||||
commit 51b020dca500141a6e78ab549765f09a34ac75fc
|
||||
Author: Richard Hughes <richard@hughsie.com>
|
||||
Date: Tue Sep 16 19:07:39 2008 +0100
|
||||
|
||||
yum: hook up get-distro-upgrades in the dispatcher, and make sure we send a proper error in this case
|
||||
|
||||
diff --git a/python/packagekit/backend.py b/python/packagekit/backend.py
|
||||
index 09fd1da..87abaa7 100644
|
||||
--- a/python/packagekit/backend.py
|
||||
+++ b/python/packagekit/backend.py
|
||||
@@ -468,6 +468,9 @@ class PackageKitBaseBackend:
|
||||
pkgs = args[0].split('|')
|
||||
self.get_update_detail(pkgs)
|
||||
self.finished();
|
||||
+ elif cmd == 'get-distro-upgrades':
|
||||
+ self.get_distro_upgrades()
|
||||
+ self.finished();
|
||||
elif cmd == 'get-updates':
|
||||
filters = args[0]
|
||||
self.get_updates(filters)
|
||||
@@ -549,9 +552,9 @@ class PackageKitBaseBackend:
|
||||
self.what_provides(filters,provides_type,search)
|
||||
self.finished();
|
||||
else:
|
||||
- print "command [%s] is not known" % cmd
|
||||
-
|
||||
-
|
||||
+ errmsg = "command '%s' is not known" % cmd
|
||||
+ self.error(ERROR_INTERNAL_ERROR,errmsg,exit=False)
|
||||
+ self.finished();
|
||||
|
||||
def exceptionHandler(typ,value,tb,base):
|
||||
# Restore original exception handler
|
||||
|
||||
Loading…
Reference in New Issue
Block a user