- New upstream version
- Add a helper which can be used by GStreamer to install codecs.
Thu Sep 25 2008 Richard Hughes <rhughes@redhat.com> - 0.3.4-5
- When returning results from a cache we should always return finished in
an idle loop so we can block and wait for a response
- This fixes the bug where if you have two GetUpdates in the queue the
second would hang waiting for the first, even though it had already
finished.
This commit is contained in:
parent
d8ef186343
commit
b49e88f68c
@ -1 +1 @@
|
||||
PackageKit-0.3.4.tar.gz
|
||||
PackageKit-0.3.5.tar.gz
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
|
||||
Summary: System daemon that is a DBUS abstraction layer for package management
|
||||
Name: PackageKit
|
||||
Version: 0.3.4
|
||||
Release: 5%{?dist}
|
||||
Version: 0.3.5
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://packagekit.freedesktop.org
|
||||
@ -16,16 +16,7 @@ Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.gz
|
||||
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
|
||||
|
||||
# upstream: 16bea44b16fd8b1ac36cc5939caf1017eece12eb
|
||||
Patch2: pk-fix-yum-error-name.patch
|
||||
|
||||
# upstream: 58955c21674e37d43d7353d30ab1da3163699e94
|
||||
Patch3: pk-dont-hang-when-cache-deep.patch
|
||||
#Patch0: pk-dont-send-finished-from-dispatcher.patch
|
||||
|
||||
Requires: dbus >= %{dbus_version}
|
||||
Requires: dbus-glib >= %{dbus_glib_version}
|
||||
@ -55,6 +46,7 @@ BuildRequires: intltool
|
||||
BuildRequires: gettext
|
||||
BuildRequires: xulrunner-devel
|
||||
BuildRequires: libarchive-devel
|
||||
BuildRequires: gstreamer-devel
|
||||
|
||||
%description
|
||||
PackageKit is a D-Bus abstraction layer that allows the session user
|
||||
@ -149,12 +141,21 @@ The PackageKit browser plugin allows web sites to offer the ability to
|
||||
users to install and update packages from configured repositories
|
||||
using PackageKit.
|
||||
|
||||
%package gstreamer-plugin
|
||||
Summary: Install GStreamer codecs using PackageKit
|
||||
Group: Development/Libraries
|
||||
Requires: gstreamer
|
||||
Requires: PackageKit-libs = %{version}-%{release}
|
||||
Obsoletes: codeina < 0.10.1-8
|
||||
Provides: codeina = 0.10.1-8
|
||||
|
||||
%description gstreamer-plugin
|
||||
The PackageKit GStreamer plugin allows any Gstreamer application to install
|
||||
codecs from configured repositories using PackageKit.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
#%patch0 -p1
|
||||
|
||||
%build
|
||||
%configure --enable-yum --enable-smart --with-default-backend=yum --disable-local
|
||||
@ -173,6 +174,11 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/packagekit-plugin.a
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/packagekit-plugin.la
|
||||
chmod 755 $RPM_BUILD_ROOT%{_libexecdir}/PackageKitDbusTest.py
|
||||
|
||||
# create a link that GStreamer will recognise
|
||||
pushd ${RPM_BUILD_ROOT}%{_libexecdir} > /dev/null
|
||||
ln -s pk-gstreamer-install gst-install-plugins-helper
|
||||
popd > /dev/null
|
||||
|
||||
%find_lang %name
|
||||
|
||||
%clean
|
||||
@ -217,7 +223,6 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
|
||||
%{_bindir}/pkgenpack
|
||||
%{_bindir}/packagekit-bugreport.sh
|
||||
%{_libexecdir}/pk-import-*
|
||||
%{_libexecdir}/pk-generate-*
|
||||
%exclude %{_libdir}/libpackagekit*.so.*
|
||||
%{_libdir}/packagekit-backend/libpk_backend_dummy.so
|
||||
%{_libdir}/packagekit-backend/libpk_backend_test_*.so
|
||||
@ -277,6 +282,12 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
|
||||
%dir %{_libdir}/mozilla/plugins
|
||||
%{_libdir}/mozilla/plugins/packagekit-plugin.so
|
||||
|
||||
%files gstreamer-plugin
|
||||
%defattr(-,root,root,-)
|
||||
%doc README AUTHORS NEWS COPYING
|
||||
%{_libexecdir}/pk-gstreamer-install
|
||||
%{_libexecdir}/gst-install-plugins-helper
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc README AUTHORS NEWS COPYING
|
||||
@ -285,6 +296,10 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
|
||||
%{_includedir}/*
|
||||
|
||||
%changelog
|
||||
* Mon Sep 29 2008 Richard Hughes <rhughes@redhat.com> - 0.3.5-1
|
||||
- New upstream version
|
||||
- Add a helper which can be used by GStreamer to install codecs.
|
||||
|
||||
* Thu Sep 25 2008 Richard Hughes <rhughes@redhat.com> - 0.3.4-5
|
||||
- When returning results from a cache we should always return finished in an
|
||||
idle loop so we can block and wait for a response
|
||||
|
||||
@ -1,106 +0,0 @@
|
||||
commit 58955c21674e37d43d7353d30ab1da3163699e94
|
||||
Author: Richard Hughes <richard@hughsie.com>
|
||||
Date: Thu Sep 25 14:32:25 2008 +0100
|
||||
|
||||
bugfix: finish a cached transaction in an idle loop
|
||||
|
||||
When returning results from a cache we should always return finished in an idle
|
||||
loop so we can block and wait for a response without having to know if we need
|
||||
to wait for ::Finished()
|
||||
|
||||
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
|
||||
index db68d4d..73f86dc 100644
|
||||
--- a/src/pk-transaction.c
|
||||
+++ b/src/pk-transaction.c
|
||||
@@ -1093,6 +1093,19 @@ pk_transaction_commit (PkTransaction *transaction)
|
||||
}
|
||||
|
||||
/**
|
||||
+ * pk_transaction_finished_idle_cb:
|
||||
+ **/
|
||||
+static gboolean
|
||||
+pk_transaction_finished_idle_cb (PkTransaction *transaction)
|
||||
+{
|
||||
+ const gchar *exit_text;
|
||||
+ exit_text = pk_exit_enum_to_text (PK_EXIT_ENUM_SUCCESS);
|
||||
+ egg_debug ("emitting finished '%s'", exit_text);
|
||||
+ g_signal_emit (transaction, signals [PK_TRANSACTION_FINISHED], 0, exit_text, 0);
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* pk_transaction_search_check:
|
||||
**/
|
||||
static gboolean
|
||||
@@ -1236,7 +1249,6 @@ pk_transaction_accept_eula (PkTransaction *transaction, const gchar *eula_id, DB
|
||||
{
|
||||
gboolean ret;
|
||||
GError *error;
|
||||
- const gchar *exit_text;
|
||||
gchar *sender;
|
||||
|
||||
g_return_if_fail (PK_IS_TRANSACTION (transaction));
|
||||
@@ -1275,10 +1287,7 @@ pk_transaction_accept_eula (PkTransaction *transaction, const gchar *eula_id, DB
|
||||
return;
|
||||
}
|
||||
|
||||
- exit_text = pk_exit_enum_to_text (PK_EXIT_ENUM_SUCCESS);
|
||||
- egg_debug ("emitting finished transaction '%s', %i", exit_text, 0);
|
||||
- g_signal_emit (transaction, signals [PK_TRANSACTION_FINISHED], 0, exit_text, 0);
|
||||
-
|
||||
+ g_idle_add ((GSourceFunc) pk_transaction_finished_idle_cb, transaction);
|
||||
dbus_g_method_return (context);
|
||||
}
|
||||
|
||||
@@ -1746,18 +1755,13 @@ pk_transaction_get_packages (PkTransaction *transaction, const gchar *filter, DB
|
||||
gboolean
|
||||
pk_transaction_get_old_transactions (PkTransaction *transaction, guint number, GError **error)
|
||||
{
|
||||
- const gchar *exit_text;
|
||||
-
|
||||
g_return_val_if_fail (PK_IS_TRANSACTION (transaction), FALSE);
|
||||
g_return_val_if_fail (transaction->priv->tid != NULL, FALSE);
|
||||
|
||||
egg_debug ("GetOldTransactions method called");
|
||||
|
||||
pk_transaction_db_get_list (transaction->priv->transaction_db, number);
|
||||
-
|
||||
- exit_text = pk_exit_enum_to_text (PK_EXIT_ENUM_SUCCESS);
|
||||
- egg_debug ("emitting finished transaction '%s', %i", exit_text, 0);
|
||||
- g_signal_emit (transaction, signals [PK_TRANSACTION_FINISHED], 0, exit_text, 0);
|
||||
+ g_idle_add ((GSourceFunc) pk_transaction_finished_idle_cb, transaction);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -2071,10 +2075,7 @@ pk_transaction_get_update_detail (PkTransaction *transaction, gchar **package_id
|
||||
|
||||
/* if we have nothing to do, i.e. everything was in the cache */
|
||||
if (array->len == 0) {
|
||||
- const gchar *exit_text;
|
||||
- exit_text = pk_exit_enum_to_text (PK_EXIT_ENUM_SUCCESS);
|
||||
- egg_debug ("emitting finished '%s' as no more to process", exit_text);
|
||||
- g_signal_emit (transaction, signals [PK_TRANSACTION_FINISHED], 0, exit_text, 0);
|
||||
+ g_idle_add ((GSourceFunc) pk_transaction_finished_idle_cb, transaction);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -2152,7 +2153,6 @@ pk_transaction_get_updates (PkTransaction *transaction, const gchar *filter, DBu
|
||||
if (updates_cache != NULL) {
|
||||
const PkPackageObj *obj;
|
||||
const gchar *info_text;
|
||||
- const gchar *exit_text;
|
||||
guint i;
|
||||
guint length;
|
||||
|
||||
@@ -2169,10 +2169,7 @@ pk_transaction_get_updates (PkTransaction *transaction, const gchar *filter, DBu
|
||||
g_free (package_id);
|
||||
}
|
||||
|
||||
- /* we are done */
|
||||
- exit_text = pk_exit_enum_to_text (PK_EXIT_ENUM_SUCCESS);
|
||||
- egg_debug ("emitting finished '%s'", exit_text);
|
||||
- g_signal_emit (transaction, signals [PK_TRANSACTION_FINISHED], 0, exit_text, 0);
|
||||
+ g_idle_add ((GSourceFunc) pk_transaction_finished_idle_cb, transaction);
|
||||
|
||||
dbus_g_method_return (context);
|
||||
return;
|
||||
@ -1,28 +0,0 @@
|
||||
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;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
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 16bea44b16fd8b1ac36cc5939caf1017eece12eb
|
||||
Author: Richard Hughes <richard@hughsie.com>
|
||||
Date: Tue Sep 23 14:43:31 2008 +0100
|
||||
|
||||
yum: fix the name of the enum when no mirrors are found
|
||||
|
||||
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
|
||||
index b445e0d..8a29917 100755
|
||||
--- a/backends/yum/yumBackend.py
|
||||
+++ b/backends/yum/yumBackend.py
|
||||
@@ -915,7 +915,7 @@ class PackageKitYumBackend(PackageKitBaseBackend,PackagekitPackage):
|
||||
except yum.Errors.RepoError,e:
|
||||
message = self._format_msgs(e.value)
|
||||
if message.find ("No more mirrors to try") != -1:
|
||||
- self.error(ERROR_FILE_NO_MORE_MIRRORS_TO_TRY,message)
|
||||
+ self.error(ERROR_NO_MORE_MIRRORS_TO_TRY,message)
|
||||
else:
|
||||
self.error(ERROR_REPO_CONFIGURATION_ERROR,message)
|
||||
except yum.Errors.YumBaseError,e:
|
||||
Loading…
Reference in New Issue
Block a user