[Rpm-maint] [rpm-software-management/rpm] Add dbus-announce plugin (#1255)

Panu Matilainen notifications at github.com
Wed Jun 10 09:48:33 UTC 2020


@pmatilai commented on this pull request.



> +    state->logging = 1;
+
+    /* ...don't log test transactions */
+    if (rpmtsFlags(ts) & (RPMTRANS_FLAG_TEST|RPMTRANS_FLAG_BUILD_PROBS))
+	state->logging = 0;
+
+    /* ...don't log chroot transactions */
+    if (!rstreq(rpmtsRootDir(ts), "/"))
+	state->logging = 0;
+
+    /* Don't open */
+    if (!state->logging || state->bus)
+	return RPMRC_OK;
+
+    if (lstat("/run/systemd/system/", &st) == 0) {
+        if (S_ISDIR(st.st_mode)) {

That check looks like it's "inherited" from systemd_inhibit plugin, where this is relevant because we're talking to systemd over dbus (see commit ec6495d79fa9834bca3394f56e9f6eb933030b1d). This is an entirely different case though, other processes might want to know about rpmdb state changes regardless of whether systemd is running or not.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1255#discussion_r438000287
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200610/9aebb0fa/attachment.html>


More information about the Rpm-maint mailing list