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

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


@pmatilai commented on this pull request.



> +    /* ...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)) {
+	    // initialise the error value
+	    dbus_error_init(&err);
+
+	    state->bus = dbus_bus_get_private(DBUS_BUS_SYSTEM, &err);
+	    if (dbus_error_is_set(&err)) {
+		fprintf(stderr, "Connection Error (%s)\n", err.message);

This should be filtered out in case dbus isn't running to begin with, similarly to what commit 708e61307bc3fd027b016fdf5a1d1a5274c1843c does. Also, rpmlog() should be used instead of fprintf().

-- 
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#pullrequestreview-427899061
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200610/84de64ee/attachment.html>


More information about the Rpm-maint mailing list