Accepting request 844956 from home:JonathanKang:branches:GNOME:Factory
- Add PackageKit-bsc1169739.patch: main: notify the service manager when it's beginning to shutdown (gh#/hughsie/PackageKit/commit/d8dd484d, bsc#1169739). OBS-URL: https://build.opensuse.org/request/show/844956 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/PackageKit?expand=0&rev=393
This commit is contained in:
parent
a8ad5d0485
commit
af6601228d
86
PackageKit-bsc1169739.patch
Normal file
86
PackageKit-bsc1169739.patch
Normal file
@ -0,0 +1,86 @@
|
||||
From 4a11b7fabb85f110c5e00084bd3800362909defe Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Kang <jonathankang@gnome.org>
|
||||
Date: Fri, 30 Oct 2020 10:01:28 +0800
|
||||
Subject: [PATCH 1/2] main: notify the service manager when it's beginning to
|
||||
shutdown
|
||||
|
||||
This makes sure that the main process won't get SIGTERM on shutdown,
|
||||
for example timed exit after idling for a while. This fix the problem
|
||||
that libzypp fails to clean up some temporary files when packagekitd
|
||||
quits.
|
||||
---
|
||||
meson.build | 1 +
|
||||
src/pk-main.c | 7 +++++++
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index c0db907ea..2820e9366 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -29,6 +29,7 @@ if get_option('systemd')
|
||||
systemd_system_unit_dir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
|
||||
endif
|
||||
|
||||
+ add_project_arguments ('-DHAVE_SYSTEMD_SD_DAEMON_H=1', language: 'c')
|
||||
add_project_arguments ('-DHAVE_SYSTEMD_SD_LOGIN_H=1', language: 'c')
|
||||
else
|
||||
if get_option('offline_update')
|
||||
diff --git a/src/pk-main.c b/src/pk-main.c
|
||||
index 5791c5fef..40bc783b8 100644
|
||||
--- a/src/pk-main.c
|
||||
+++ b/src/pk-main.c
|
||||
@@ -32,6 +32,9 @@
|
||||
#include <glib-unix.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <packagekit-glib2/pk-debug.h>
|
||||
+#ifdef HAVE_SYSTEMD_SD_DAEMON_H
|
||||
+#include <systemd/sd-daemon.h>
|
||||
+#endif
|
||||
|
||||
#include "pk-engine.h"
|
||||
#include "pk-shared.h"
|
||||
@@ -245,6 +248,10 @@ out:
|
||||
syslog (LOG_DAEMON | LOG_DEBUG, "daemon quit");
|
||||
closelog ();
|
||||
|
||||
+#ifdef HAVE_SYSTEMD_SD_DAEMON_H
|
||||
+ sd_notify (0, "STOPPING=1");
|
||||
+#endif
|
||||
+
|
||||
if (helper.timer_id > 0)
|
||||
g_source_remove (helper.timer_id);
|
||||
if (loop != NULL)
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
||||
From 66c30ef3ad11e125b84ab32362d6597d91c819f5 Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Kang <jonathankang@gnome.org>
|
||||
Date: Fri, 30 Oct 2020 10:19:15 +0800
|
||||
Subject: [PATCH 2/2] Revert "zypp: Clean up temporary files when PK quits"
|
||||
|
||||
The previous commit was meant to workaround the fact that PackageKit
|
||||
doesn't quit normally on a timed exit. Since commit 8b621738 fixes
|
||||
that, this is no longer needed.
|
||||
|
||||
This reverts commit 807f410e28074c8ad2b99682446bbb460fd54adf.
|
||||
---
|
||||
backends/zypp/pk-backend-zypp.cpp | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
|
||||
index 0a5ed7766..2c1250331 100644
|
||||
--- a/backends/zypp/pk-backend-zypp.cpp
|
||||
+++ b/backends/zypp/pk-backend-zypp.cpp
|
||||
@@ -1837,8 +1837,6 @@ pk_backend_destroy (PkBackend *backend)
|
||||
{
|
||||
g_debug ("zypp_backend_destroy");
|
||||
|
||||
- filesystem::recursive_rmdir (zypp::myTmpDir ());
|
||||
-
|
||||
g_free (_repoName);
|
||||
delete priv;
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 30 03:12:47 UTC 2020 - Jonathan Kang <songchuan.kang@suse.com>
|
||||
|
||||
- Add PackageKit-bsc1169739.patch: main: notify the service manager
|
||||
when it's beginning to shutdown
|
||||
(gh#/hughsie/PackageKit/commit/d8dd484d, bsc#1169739).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 28 07:04:45 UTC 2020 - Franck Bui <fbui@suse.com>
|
||||
|
||||
|
@ -56,6 +56,8 @@ Patch4: PackageKit-test-Install-required-helper-files.patch
|
||||
Patch5: PackageKit-zypp-set-PATH.patch
|
||||
# PATCH-FIX-UPSTREAM PackageKit-zypp-dont-refresh-repos-on-offline-update.patch gh#/hughsie/PackageKit/commit/81207bd3, bsc#1173562 sckang@suse.com -- zypp: Don’t refresh repos again when actually updating packages
|
||||
Patch6: PackageKit-zypp-dont-refresh-repos-on-offline-update.patch
|
||||
# PATCH-FIX-UPSTREAM PackageKit-bsc1169739.patch gh#/hughsie/PackageKit/commit/d8dd484d, bsc#1169739 sckang@suse.com -- main: notify the service manager when it's beginning to shutdown
|
||||
Patch7: PackageKit-bsc1169739.patch
|
||||
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
|
Loading…
Reference in New Issue
Block a user