- New upstream version

- Renice the spawned process so that we don't hog the system when doing
    updates
Wed Oct 01 2008 Richard Hughes <rhughes@redhat.com> - 0.3.5-4
- Rename the subpackages before David blows a blood vessel.
- yum-packagekit -> PackageKit-yum-plugin
- udev-packagekit -> PackageKit-udev-helper
This commit is contained in:
Richard Hughes 2008-10-06 10:24:33 +00:00
parent f27e073168
commit c5dc487c6e
3 changed files with 12 additions and 173 deletions

View File

@ -7,8 +7,8 @@
Summary: System daemon that is a DBUS abstraction layer for package management
Name: PackageKit
Version: 0.3.5
Release: 4%{?dist}
Version: 0.3.6
Release: 1%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://packagekit.freedesktop.org
@ -16,10 +16,7 @@ Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# upstream: 920574b72805a630ea989b32012e2b4bbf1841ea
Patch0: pk-fix-64bit-codecs.patch
# upstream: d2c3725b5414e27fa05518f04eab01ab7a0b1a89
Patch1: pk-fix-cancel-at-speed-unlucky.patch
#Patch0: pk-fix-64bit-codecs.patch
Requires: dbus >= %{dbus_version}
Requires: dbus-glib >= %{dbus_glib_version}
@ -50,6 +47,7 @@ BuildRequires: gettext
BuildRequires: xulrunner-devel
BuildRequires: libarchive-devel
BuildRequires: gstreamer-devel
BuildRequires: gstreamer-plugins-base-devel
%description
PackageKit is a D-Bus abstraction layer that allows the session user
@ -151,8 +149,8 @@ Summary: Install GStreamer codecs using PackageKit
Group: Development/Libraries
Requires: gstreamer
Requires: PackageKit-libs = %{version}-%{release}
Obsoletes: codeina < 0.10.1
Provides: codeina = 0.10.1
Obsoletes: codeina < 0.10.1-10
Provides: codeina = 0.10.1-10
%description gstreamer-plugin
The PackageKit GStreamer plugin allows any Gstreamer application to install
@ -160,8 +158,7 @@ codecs from configured repositories using PackageKit.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
#%patch0 -p1
%build
%configure --enable-yum --enable-smart --with-default-backend=yum --disable-local
@ -215,7 +212,7 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{python_sitelib}/packagekit/*py*
%dir %{_sysconfdir}/bash_completion.d
%config %{_sysconfdir}/bash_completion.d/pk-completion.bash
%config(noreplace) %{_sysconfdir}/PackageKit/PackageKit.conf
%config(noreplace) %{_sysconfdir}/PackageKit/*.conf
%config %{_sysconfdir}/dbus-1/system.d/*
%dir %{_datadir}/PackageKit/helpers/test_spawn
%{_datadir}/PackageKit/helpers/test_spawn/*
@ -302,6 +299,10 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_includedir}/*
%changelog
* Mon Oct 06 2008 Richard Hughes <rhughes@redhat.com> - 0.3.6-1
- New upstream version
- Renice the spawned process so that we don't hog the system when doing updates
* Wed Oct 01 2008 Richard Hughes <rhughes@redhat.com> - 0.3.5-4
- Rename the subpackages before David blows a blood vessel.
- yum-packagekit -> PackageKit-yum-plugin

View File

@ -1,104 +0,0 @@
commit 920574b72805a630ea989b32012e2b4bbf1841ea
Author: Richard Hughes <richard@hughsie.com>
Date: Tue Sep 30 13:21:08 2008 +0100
bugfix: use a ()(64bit) suffix for the package provides on 64 bit machines
diff --git a/contrib/gstreamer-plugin/pk-gstreamer-install.c b/contrib/gstreamer-plugin/pk-gstreamer-install.c
index f9ba620..a2d6602 100644
--- a/contrib/gstreamer-plugin/pk-gstreamer-install.c
+++ b/contrib/gstreamer-plugin/pk-gstreamer-install.c
@@ -22,6 +22,7 @@
#include <gst/gst.h>
#include <string.h>
+#include <sys/utsname.h>
#include <dbus/dbus-glib.h>
typedef struct {
@@ -227,6 +228,44 @@ pk_gst_codec_free (codec_info *codec)
}
/**
+ * pk_gst_get_arch_suffix:
+ *
+ * Return value: something other than blank if we are running on 64 bit.
+ **/
+static const gchar *
+pk_gst_get_arch_suffix (void)
+{
+ gint retval;
+ const gchar *suffix = "";
+ struct utsname buf;
+
+ retval = uname (&buf);
+
+ /* did we get valid value? */
+ if (retval != 0 || buf.machine == NULL) {
+ g_warning ("cannot get machine type");
+ goto out;
+ }
+
+ /* 32 bit machines */
+ if (strcmp (buf.machine, "i386") == 0 ||
+ strcmp (buf.machine, "i586") == 0 ||
+ strcmp (buf.machine, "i686") == 0)
+ goto out;
+
+ /* 64 bit machines */
+ if (strcmp (buf.machine, "x86_64") == 0) {
+ suffix = "()(64bit)";
+ goto out;
+ }
+
+ g_warning ("did not recognise machine type: '%s'", buf.machine);
+out:
+ return suffix;
+}
+
+
+/**
* main:
**/
int
@@ -245,6 +284,7 @@ main (int argc, char **argv)
gchar **codecs = NULL;
gint xid = 0;
gint retval = 1;
+ const gchar *suffix;
const GOptionEntry options[] = {
{ "transient-for", '\0', 0, G_OPTION_ARG_INT, &xid, "The XID of the parent window", NULL },
@@ -288,6 +328,8 @@ main (int argc, char **argv)
goto out;
}
+ /* use a ()(64bit) suffix for 64 bit */
+ suffix = pk_gst_get_arch_suffix ();
/* process argv */
array = g_ptr_array_new ();
@@ -301,18 +343,18 @@ main (int argc, char **argv)
g_print ("skipping %s\n", codecs[i]);
continue;
}
+ g_message ("Codec nice name: %s", info->codec_name);
if (info->structure != NULL) {
s = pk_gst_structure_to_provide (info->structure);
- type = g_strdup_printf ("gstreamer0.10(%s-%s)%s", info->type_name,
- gst_structure_get_name (info->structure), s ? s : "");
+ type = g_strdup_printf ("gstreamer0.10(%s-%s)%s%s", info->type_name,
+ gst_structure_get_name (info->structure), s, suffix);
g_free (s);
+ g_message ("structure: %s", type);
} else {
type = g_strdup_printf ("gstreamer0.10(%s)", info->type_name);
+ g_message ("non-structure: %s", type);
}
- g_message ("Codec nice name: %s", info->codec_name);
- g_message ("%s", type);
-
/* create (ss) structure */
varray = g_value_array_new (2);
value = g_new0 (GValue, 1);

View File

@ -1,58 +0,0 @@
commit d2c3725b5414e27fa05518f04eab01ab7a0b1a89
Author: Richard Hughes <hughsie@localhost.localdomain>
Date: Tue Sep 30 10:42:32 2008 +0100
bugfix: remove items about to be run from the transaction list without crashing
The daemon sometimes crashes when a large number of requests are queued and then cancelled
This is because by sheer luck (on unluckyness...) we get a request in the idle time between
the transaction being scheduled to run, and actually being run.
In this case, save the idle callback ID, and stop the callback from occurring
diff --git a/src/pk-transaction-list.c b/src/pk-transaction-list.c
index d975f6b..9470da9 100644
--- a/src/pk-transaction-list.c
+++ b/src/pk-transaction-list.c
@@ -69,6 +69,7 @@ typedef struct {
gboolean finished;
PkTransaction *transaction;
gchar *tid;
+ guint idle_id;
} PkTransactionItem;
enum {
@@ -199,6 +200,17 @@ pk_transaction_list_remove (PkTransactionList *tlist, const gchar *tid)
egg_warning ("already finished, so waiting to timeout");
return FALSE;
}
+ /* check if we are running, or _just_ about to be run */
+ if (item->running) {
+ if (item->idle_id == 0) {
+ egg_warning ("already running, but no idle_id");
+ return FALSE;
+ }
+ /* just about to be run! */
+ egg_debug ("cancelling the callback to the 'lost' transaction");
+ g_source_remove (item->idle_id);
+ item->idle_id = 0;
+ }
ret = pk_transaction_list_remove_internal (tlist, item);
return ret;
}
@@ -237,6 +249,7 @@ pk_transaction_list_run_idle_cb (PkTransactionItem *item)
egg_error ("failed to run transaction (fatal)");
/* never try to idle add this again */
+ item->idle_id = 0;
return FALSE;
}
@@ -251,7 +264,7 @@ pk_transaction_list_run_item (PkTransactionList *tlist, PkTransactionItem *item)
item->running = TRUE;
/* add this idle, so that we don't have a deep out-of-order callchain */
- g_idle_add ((GSourceFunc) pk_transaction_list_run_idle_cb, item);
+ item->idle_id = g_idle_add ((GSourceFunc) pk_transaction_list_run_idle_cb, item);
}
/**