]> git.pld-linux.org Git - packages/PackageKit.git/blob - consolekit-fallback.patch
- updated to 1.2.6
[packages/PackageKit.git] / consolekit-fallback.patch
1 --- PackageKit-1.1.13/src/pk-dbus.c.orig        2018-12-14 10:05:15.000000000 +0100
2 +++ PackageKit-1.1.13/src/pk-dbus.c     2020-03-03 11:41:02.148537933 +0100
3 @@ -28,6 +28,7 @@
4  #include <gio/gio.h>
5  
6  #ifdef HAVE_SYSTEMD_SD_LOGIN_H
7 + #include <systemd/sd-daemon.h>
8   #include <systemd/sd-login.h>
9  #endif
10  
11 @@ -218,9 +219,7 @@ gchar *
12  pk_dbus_get_session (PkDbus *dbus, const gchar *sender)
13  {
14         gchar *session = NULL;
15 -#ifndef HAVE_SYSTEMD_SD_LOGIN_H
16         g_autoptr(GError) error = NULL;
17 -#endif
18         guint pid;
19         g_autoptr(GVariant) value = NULL;
20  
21 @@ -249,10 +248,12 @@ pk_dbus_get_session (PkDbus *dbus, const
22  
23         /* get session from systemd or ConsoleKit */
24  #ifdef HAVE_SYSTEMD_SD_LOGIN_H
25 +       if (sd_booted () > 0) {
26         session = pk_dbus_get_session_systemd (pid);
27         if (session == NULL)
28                 g_warning ("failed to get session for pid %u", pid);
29 -#else
30 +       } else {
31 +#endif
32         /* get session from ConsoleKit */
33         value = g_dbus_proxy_call_sync (dbus->priv->proxy_session,
34                                         "GetSessionForUnixProcess",
35 @@ -268,6 +269,8 @@ pk_dbus_get_session (PkDbus *dbus, const
36                 goto out;
37         }
38         g_variant_get (value, "(o)", &session);
39 +#ifdef HAVE_SYSTEMD_SD_LOGIN_H
40 +       }
41  #endif
42  out:
43         return session;
This page took 0.088769 seconds and 3 git commands to generate.