]> git.pld-linux.org Git - packages/PackageKit.git/blame - consolekit-fallback.patch
- up to 1.0.7
[packages/PackageKit.git] / consolekit-fallback.patch
CommitLineData
bcd7526e
JR
1--- PackageKit-1.0.7/configure.ac~ 2015-08-02 12:49:14.000000000 +0200
2+++ PackageKit-1.0.7/configure.ac 2015-08-02 12:58:42.496449586 +0200
3@@ -235,7 +235,7 @@
4 AC_ARG_ENABLE(systemd, AS_HELP_STRING([--enable-systemd],[enable systemd and logind code]),
5 enable_systemd=$enableval,enable_systemd=yes)
6 if test x$enable_systemd = xyes; then
7- PKG_CHECK_MODULES(SYSTEMD, libsystemd-login libsystemd-journal)
8+ PKG_CHECK_MODULES(SYSTEMD, libsystemd-login libsystemd-journal libsystemd-daemon)
9 AC_ARG_WITH([systemdsystemunitdir],
10 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
11 [has_systemdsystemunitdir=$with_systemdsystemunitdir],
12--- PackageKit-1.0.7/src/pk-dbus.c~ 2015-04-22 11:54:49.000000000 +0200
13+++ PackageKit-1.0.7/src/pk-dbus.c 2015-08-02 12:57:29.398321174 +0200
14@@ -28,6 +28,7 @@
15 #include <gio/gio.h>
16
17 #ifdef HAVE_SYSTEMD
18+ #include <systemd/sd-daemon.h>
19 #include <systemd/sd-login.h>
20 #endif
21
22@@ -222,9 +222,7 @@
23 pk_dbus_get_session (PkDbus *dbus, const gchar *sender)
24 {
25 gchar *session = NULL;
26-#ifndef HAVE_SYSTEMD
27 _cleanup_error_free_ GError *error = NULL;
28-#endif
29 guint pid;
30 _cleanup_variant_unref_ GVariant *value = NULL;
31
32@@ -252,8 +254,10 @@
33
34 /* get session from systemd or ConsoleKit */
35 #ifdef HAVE_SYSTEMD
36+ if (sd_booted () > 0) {
37 session = pk_dbus_get_session_systemd (pid);
38-#else
39+ } else {
40+#endif
41 /* get session from ConsoleKit */
42 value = g_dbus_proxy_call_sync (dbus->priv->proxy_session,
43 "GetSessionForUnixProcess",
44@@ -269,6 +273,8 @@
45 goto out;
46 }
47 g_variant_get (value, "(o)", &session);
48+#ifdef HAVE_SYSTEMD
49+ }
50 #endif
51 out:
52 return session;
This page took 0.095018 seconds and 4 git commands to generate.