Backport 2 fixes from master to increase the maximum number of packages that
can be processed, and also to fix a race in the offline updates feature.
This commit is contained in:
parent
106e20dde9
commit
63f4ea2ab8
71
PackageKit-git-fixes.patch
Normal file
71
PackageKit-git-fixes.patch
Normal file
@ -0,0 +1,71 @@
|
||||
commit f25455d2d48d20f6086effe47971ed439cee2cc5
|
||||
Author: Richard Hughes <richard@hughsie.com>
|
||||
Date: Thu Jun 6 13:10:58 2013 +0100
|
||||
|
||||
systemd-updates: Do not exit with an error for a race condition
|
||||
|
||||
The daemon plugin pk-plugin-systemd-update deletes the /var/lib/PackageKit/prepared-update
|
||||
file if any transaction is done that affects the prepared state.
|
||||
This includes the offline-update process itself.
|
||||
|
||||
If the daemon deletes the file before the pk-offline-update process tries to do
|
||||
it a warning is shown and the systemd unit fails.
|
||||
|
||||
diff --git a/contrib/systemd-updates/pk-offline-update.c b/contrib/systemd-updates/pk-offline-update.c
|
||||
index 8678959..7b8d812 100644
|
||||
--- a/contrib/systemd-updates/pk-offline-update.c
|
||||
+++ b/contrib/systemd-updates/pk-offline-update.c
|
||||
@@ -500,16 +500,20 @@ main (int argc, char *argv[])
|
||||
pk_progress_bar_end (progressbar);
|
||||
pk_offline_update_write_results (results);
|
||||
|
||||
- /* delete prepared-update file */
|
||||
+ /* delete prepared-update file if it's not already been done by the
|
||||
+ * pk-plugin-systemd-update daemon plugin */
|
||||
file = g_file_new_for_path (PK_OFFLINE_PREPARED_UPDATE_FILENAME);
|
||||
ret = g_file_delete (file, NULL, &error);
|
||||
if (!ret) {
|
||||
- retval = EXIT_FAILURE;
|
||||
- g_warning ("failed to delete %s: %s",
|
||||
- PK_OFFLINE_PREPARED_UPDATE_FILENAME,
|
||||
- error->message);
|
||||
- g_error_free (error);
|
||||
- goto out;
|
||||
+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) {
|
||||
+ retval = EXIT_FAILURE;
|
||||
+ g_warning ("failed to delete %s: %s",
|
||||
+ PK_OFFLINE_PREPARED_UPDATE_FILENAME,
|
||||
+ error->message);
|
||||
+ g_error_free (error);
|
||||
+ goto out;
|
||||
+ }
|
||||
+ g_clear_error (&error);
|
||||
}
|
||||
|
||||
retval = EXIT_SUCCESS;
|
||||
commit 3eb921f2ddbe94dc5b180522b8aa5a057dd6eac2
|
||||
Author: Richard Hughes <richard@hughsie.com>
|
||||
Date: Thu May 23 15:06:41 2013 +0100
|
||||
|
||||
Raise the package process threshold to 5000
|
||||
|
||||
TeXLive has officially jumped the shark, and it's quite plausible to have > 2500
|
||||
updates in one transaction now.
|
||||
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=894731
|
||||
|
||||
diff --git a/etc/PackageKit.conf.in b/etc/PackageKit.conf.in
|
||||
index 3440be5..c09c8d2 100644
|
||||
--- a/etc/PackageKit.conf.in
|
||||
+++ b/etc/PackageKit.conf.in
|
||||
@@ -228,8 +228,8 @@ MaximumItemsToResolve=1200
|
||||
# Setting this lower decreases the risk of a local denial of service, but may
|
||||
# cause errors if the desktop client is trying to do a large transaction.
|
||||
#
|
||||
-# default=2500
|
||||
-MaximumPackagesToProcess=2500
|
||||
+# default=5000
|
||||
+MaximumPackagesToProcess=5000
|
||||
|
||||
# How long the transaction is valid before it's destroyed, in seconds
|
||||
#
|
||||
@ -6,7 +6,7 @@
|
||||
Summary: Package management service
|
||||
Name: PackageKit
|
||||
Version: 0.8.9
|
||||
Release: 2%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPLv2+ and LGPLv2+
|
||||
URL: http://www.packagekit.org
|
||||
Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.xz
|
||||
@ -20,6 +20,9 @@ Patch1: PackageKit-0.4.4-Fedora-turn-off-time.conf.patch
|
||||
# Upstreamable? allow use of xulrunner2 for browser-plugin support
|
||||
Patch4: PackageKit-0.7.4-xulrunner2.patch
|
||||
|
||||
# Upstream already
|
||||
Patch99: PackageKit-git-fixes.patch
|
||||
|
||||
Requires: %{name}-glib%{?_isa} = %{version}-%{release}
|
||||
Requires: PackageKit-backend
|
||||
Requires: shared-mime-info
|
||||
@ -240,6 +243,7 @@ user to restart the computer or remove and re-insert the device.
|
||||
%patch0 -p1 -b .fedora
|
||||
%patch1 -p1 -b .no-time
|
||||
%patch4 -p1 -b .xulrunner2
|
||||
%patch99 -p1 -b .git
|
||||
|
||||
NOCONFIGURE=1 ./autogen.sh
|
||||
|
||||
@ -441,9 +445,13 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
|
||||
%{_libdir}/pkgconfig/packagekit-plugin.pc
|
||||
|
||||
%changelog
|
||||
* Sat Jun 22 2013 Matthias Clasen <mclasen@redhat.com> - 0.8.9-3
|
||||
* Sat Jun 22 2013 Matthias Clasen <mclasen@redhat.com> - 0.8.9-4
|
||||
- Trim %%changelog
|
||||
|
||||
* Thu Jun 06 2013 Richard Hughes <rhughes@redhat.com> - 0.8.9-3
|
||||
- Backport 2 fixes from master to increase the maximum number of packages that
|
||||
can be processed, and also to fix a race in the offline updates feature.
|
||||
|
||||
* Tue May 21 2013 Matthias Clasen <mclasen@redhat.com> - 0.8.9-2
|
||||
- Make build without bash-completion actually work
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user