]> git.pld-linux.org Git - packages/PackageKit.git/blob - consolekit-fallback.patch
- drop system-update.target.wants - it belongs to systemd.spec
[packages/PackageKit.git] / consolekit-fallback.patch
1 --- PackageKit-1.0.7/src/pk-dbus.c~     2015-04-22 11:54:49.000000000 +0200
2 +++ PackageKit-1.0.7/src/pk-dbus.c      2015-08-02 12:57:29.398321174 +0200
3 @@ -28,6 +28,7 @@
4  #include <gio/gio.h>
5  
6  #ifdef HAVE_SYSTEMD
7 + #include <systemd/sd-daemon.h>
8   #include <systemd/sd-login.h>
9  #endif
10  
11 @@ -222,9 +222,7 @@
12  pk_dbus_get_session (PkDbus *dbus, const gchar *sender)
13  {
14         gchar *session = NULL;
15 -#ifndef HAVE_SYSTEMD
16         _cleanup_error_free_ GError *error = NULL;
17 -#endif
18         guint pid;
19         _cleanup_variant_unref_ GVariant *value = NULL;
20  
21 @@ -252,8 +254,10 @@
22  
23         /* get session from systemd or ConsoleKit */
24  #ifdef HAVE_SYSTEMD
25 +        if (sd_booted () > 0) {
26         session = pk_dbus_get_session_systemd (pid);
27 -#else
28 +       } else {
29 +#endif
30         /* get session from ConsoleKit */
31         value = g_dbus_proxy_call_sync (dbus->priv->proxy_session,
32                                         "GetSessionForUnixProcess",
33 @@ -269,6 +273,8 @@
34                 goto out;
35         }
36         g_variant_get (value, "(o)", &session);
37 +#ifdef HAVE_SYSTEMD
38 +       }
39  #endif
40  out:
41         return session;
This page took 0.04845 seconds and 3 git commands to generate.