rpm/0001-Revert-Fully-shutdown-DBUS-on-systemd_inhibit-cleanu.patch

44 lines
1.4 KiB
Diff

From 2dc1f85de96194922df41d819cf5077436710508 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Tue, 15 Oct 2019 17:01:02 -0700
Subject: [PATCH] Revert "Fully shutdown DBUS on systemd_inhibit cleanup
(RhBug:1714657)"
This reverts commit d5f201345f6d27b6280750e5c6502f4418614fbc.
It causes problems for dnfdaemon because it uses dbus itself,
and the RPM python bindings; in some circumstances the plugin's
cleanup routine is triggered and the `dbus_shutdown()` call
causes dnfdaemon to crash the next time it tries to use dbus
itself.
---
plugins/systemd_inhibit.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/plugins/systemd_inhibit.c b/plugins/systemd_inhibit.c
index 9cb722761..0ddca9cd8 100644
--- a/plugins/systemd_inhibit.c
+++ b/plugins/systemd_inhibit.c
@@ -82,11 +82,6 @@ static rpmRC systemd_inhibit_init(rpmPlugin plugin, rpmts ts)
return RPMRC_NOTFOUND;
}
-static void systemd_inhibit_cleanup(rpmPlugin plugin)
-{
- dbus_shutdown();
-}
-
static rpmRC systemd_inhibit_tsm_pre(rpmPlugin plugin, rpmts ts)
{
if (rpmtsFlags(ts) & (RPMTRANS_FLAG_TEST|RPMTRANS_FLAG_BUILD_PROBS))
@@ -113,7 +108,6 @@ static rpmRC systemd_inhibit_tsm_post(rpmPlugin plugin, rpmts ts, int res)
struct rpmPluginHooks_s systemd_inhibit_hooks = {
.init = systemd_inhibit_init,
- .cleanup = systemd_inhibit_cleanup,
.tsm_pre = systemd_inhibit_tsm_pre,
.tsm_post = systemd_inhibit_tsm_post,
};
--
2.23.0