From add00b0009a52d662767862d6da1cdc361c0346a Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 15 May 2015 21:29:50 +0200 Subject: [PATCH] Revert "Make "reboot" the default action for no action file" Revert a commit that inadvertantly changed the default value for the TriggerAction DBus property. --- ...ot-the-default-action-for-no-action-.patch | 51 +++++++++++++++++++ PackageKit.spec | 9 +++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 0001-Revert-Make-reboot-the-default-action-for-no-action-.patch diff --git a/0001-Revert-Make-reboot-the-default-action-for-no-action-.patch b/0001-Revert-Make-reboot-the-default-action-for-no-action-.patch new file mode 100644 index 0000000..abbcc39 --- /dev/null +++ b/0001-Revert-Make-reboot-the-default-action-for-no-action-.patch @@ -0,0 +1,51 @@ +From dffc8f1b0d4077ef07ec17181ed6f17723ce2120 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Thu, 14 May 2015 17:28:21 +0200 +Subject: [PATCH] Revert "Make "reboot" the default action for no action file" + +As a side effect, this commit inadvertently changed the default value +for the TriggerAction DBus property. This led to a fallout in the +gnome-shell shutdown dialog where the default then flipped to always +installing pending software updates on reboot / shutdown. + +As for the issue that the original commit tried to address: it did so in +the wrong place. If there's a problem with the offline update process +hanging when no default is set, that should be addressed in +client/pk-offline-update.c to properly handle the UNSET state and not by +changing the default in the library. + +This reverts commit 0a7b6d67b98cd06cabe03176c02db83f276dbe7b. +--- + lib/packagekit-glib2/pk-offline.c | 2 +- + lib/packagekit-glib2/pk-test-private.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/packagekit-glib2/pk-offline.c b/lib/packagekit-glib2/pk-offline.c +index 60cd81f..5985ba8 100644 +--- a/lib/packagekit-glib2/pk-offline.c ++++ b/lib/packagekit-glib2/pk-offline.c +@@ -240,7 +240,7 @@ pk_offline_get_action (GError **error) + /* is the trigger set? */ + if (!g_file_test (PK_OFFLINE_TRIGGER_FILENAME, G_FILE_TEST_EXISTS) || + !g_file_test (PK_OFFLINE_ACTION_FILENAME, G_FILE_TEST_EXISTS)) +- return PK_OFFLINE_ACTION_REBOOT; ++ return PK_OFFLINE_ACTION_UNSET; + + /* read data file */ + if (!g_file_get_contents (PK_OFFLINE_ACTION_FILENAME, +diff --git a/lib/packagekit-glib2/pk-test-private.c b/lib/packagekit-glib2/pk-test-private.c +index 4a79c7c..1ac4331 100644 +--- a/lib/packagekit-glib2/pk-test-private.c ++++ b/lib/packagekit-glib2/pk-test-private.c +@@ -652,7 +652,7 @@ pk_test_offline_func (void) + /* test no action set */ + action = pk_offline_get_action (&error); + g_assert_no_error (error); +- g_assert_cmpint (action, ==, PK_OFFLINE_ACTION_REBOOT); ++ g_assert_cmpint (action, ==, PK_OFFLINE_ACTION_UNSET); + + /* try to trigger without the fake updates set */ + ret = pk_offline_auth_trigger (PK_OFFLINE_ACTION_REBOOT, &error); +-- +2.4.0 + diff --git a/PackageKit.spec b/PackageKit.spec index d710d51..e14169f 100644 --- a/PackageKit.spec +++ b/PackageKit.spec @@ -7,7 +7,7 @@ Summary: Package management service Name: PackageKit Version: 1.0.6 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ and LGPLv2+ URL: http://www.freedesktop.org/software/PackageKit/ Source0: http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz @@ -17,6 +17,8 @@ Source1: cached-metadata.tar # Fedora-specific: set Vendor.conf up for Fedora. Patch0: PackageKit-0.3.8-Fedora-Vendor.conf.patch +# Backported upstream patch +Patch1: 0001-Revert-Make-reboot-the-default-action-for-no-action-.patch Requires: %{name}-glib%{?_isa} = %{version}-%{release} Requires: shared-mime-info @@ -173,6 +175,7 @@ using PackageKit. %prep %setup -q %patch0 -p1 -b .fedora +%patch1 -p1 %build %configure \ @@ -312,6 +315,10 @@ systemctl disable packagekit-offline-update.service > /dev/null 2>&1 || : %{_datadir}/gtk-doc/html/PackageKit %changelog +* Fri May 15 2015 Kalev Lember - 1.0.6-3 +- Revert a commit that inadvertantly changed the default value for the + TriggerAction DBus property + * Mon May 11 2015 Kalev Lember - 1.0.6-2 - Update cached metadata