[lightdm/epel7: 56/58] Revert "fix systemd-logind support in -gobject bindings (#973618)"

Rex Dieter rdieter at fedoraproject.org
Fri Feb 20 00:11:24 UTC 2015


commit b2606fd8d81aa786b75e7a096a4366103d0131d1
Author: Rex Dieter <rdieter at gmail.com>
Date:   Thu Feb 19 17:16:13 2015 -0600

    Revert "fix systemd-logind support in -gobject bindings (#973618)"
    
    This reverts commit 25f92dac81484c11e39140a19745555f46c39fb8.

 ...tch => lightdm-1.5.1-systemd_login1_power.patch | 35 +++++++++++-----------
 lightdm.spec                                       |  7 ++---
 2 files changed, 20 insertions(+), 22 deletions(-)
---
diff --git a/lightdm-1.6.0-systemd_login1_power.patch b/lightdm-1.5.1-systemd_login1_power.patch
similarity index 85%
rename from lightdm-1.6.0-systemd_login1_power.patch
rename to lightdm-1.5.1-systemd_login1_power.patch
index 4a26481..0bcb245 100644
--- a/lightdm-1.6.0-systemd_login1_power.patch
+++ b/lightdm-1.5.1-systemd_login1_power.patch
@@ -1,6 +1,6 @@
-diff -up lightdm-1.6.0/liblightdm-gobject/power.c.systemd_login1_power lightdm-1.6.0/liblightdm-gobject/power.c
---- lightdm-1.6.0/liblightdm-gobject/power.c.systemd_login1_power	2013-03-05 20:40:10.000000000 -0600
-+++ lightdm-1.6.0/liblightdm-gobject/power.c	2013-06-20 15:13:52.085421706 -0500
+diff -up lightdm-1.5.1/liblightdm-gobject/power.c.systemd_login1_power lightdm-1.5.1/liblightdm-gobject/power.c
+--- lightdm-1.5.1/liblightdm-gobject/power.c.systemd_login1_power	2013-03-05 20:40:10.000000000 -0600
++++ lightdm-1.5.1/liblightdm-gobject/power.c	2013-03-09 11:31:00.169897568 -0600
 @@ -17,6 +17,7 @@
  
  static GDBusProxy *upower_proxy = NULL;
@@ -9,7 +9,7 @@ diff -up lightdm-1.6.0/liblightdm-gobject/power.c.systemd_login1_power lightdm-1
  
  static gboolean
  upower_call_function (const gchar *function, gboolean default_result, GError **error)
-@@ -147,6 +148,58 @@ ck_call_function (const gchar *function,
+@@ -147,6 +148,59 @@ ck_call_function (const gchar *function,
      return function_result;
  }
  
@@ -18,6 +18,7 @@ diff -up lightdm-1.6.0/liblightdm-gobject/power.c.systemd_login1_power lightdm-1
 +{
 +    GVariant *result;
 +    gboolean function_result = FALSE;
++    const gchar *true_result = "yes";
 +    gchar *str_result;
 +
 +    if (!login1_proxy)
@@ -52,15 +53,15 @@ diff -up lightdm-1.6.0/liblightdm-gobject/power.c.systemd_login1_power lightdm-1
 +    * CanReboot, CanPowerOff returns a string "yes", "no", or "challenge", not a boolean as ConsoleKit
 +    **/
 +    if (g_variant_is_of_type (result, G_VARIANT_TYPE ("(s)"))) {
-+        g_variant_get (result, "(&s)", &str_result);
-+        if(g_strcmp0(str_result, "yes") == 0) {
++        g_variant_get (result, "(b)", str_result);
++        if(g_strcmp0(str_result,true_result) == 0) {
 +            function_result = TRUE;
 +        }
 +        else {
 +            function_result = default_result;
 +        }
-+    }
-+
++    }       
++    
 +    g_variant_unref (result);
 +    return function_result;
 +}
@@ -68,7 +69,7 @@ diff -up lightdm-1.6.0/liblightdm-gobject/power.c.systemd_login1_power lightdm-1
  /**
   * lightdm_get_can_restart:
   *
-@@ -157,7 +210,11 @@ ck_call_function (const gchar *function,
+@@ -157,7 +211,11 @@ ck_call_function (const gchar *function,
  gboolean
  lightdm_get_can_restart (void)
  {
@@ -81,7 +82,7 @@ diff -up lightdm-1.6.0/liblightdm-gobject/power.c.systemd_login1_power lightdm-1
  }
  
  /**
-@@ -171,7 +228,11 @@ lightdm_get_can_restart (void)
+@@ -171,7 +229,11 @@ lightdm_get_can_restart (void)
  gboolean
  lightdm_restart (GError **error)
  {
@@ -94,12 +95,12 @@ diff -up lightdm-1.6.0/liblightdm-gobject/power.c.systemd_login1_power lightdm-1
  }
  
  /**
-@@ -184,7 +245,11 @@ lightdm_restart (GError **error)
+@@ -184,7 +246,11 @@ lightdm_restart (GError **error)
  gboolean
  lightdm_get_can_shutdown (void)
  {
 -    return ck_call_function ("CanStop", FALSE, NULL);
-+    gboolean function_result = FALSE;
++    gboolean function_result = FALSE; 
 +    function_result = login1_call_function ("CanPowerOff", NULL, FALSE, NULL);
 +    if (!function_result)
 +          function_result = ck_call_function ("CanStop", FALSE, NULL);
@@ -107,20 +108,20 @@ diff -up lightdm-1.6.0/liblightdm-gobject/power.c.systemd_login1_power lightdm-1
  }
  
  /**
-@@ -198,5 +263,9 @@ lightdm_get_can_shutdown (void)
+@@ -198,5 +264,9 @@ lightdm_get_can_shutdown (void)
  gboolean
  lightdm_shutdown (GError **error)
  {
 -    return ck_call_function ("Stop", TRUE, error);
-+    gboolean function_result = FALSE;
++    gboolean function_result = FALSE; 
 +    function_result = login1_call_function ("PowerOff", g_variant_new("(b)",0), TRUE, error);
 +    if (!function_result)
 +          function_result = ck_call_function ("Stop", TRUE, error);
 +    return function_result;
  }
-diff -up lightdm-1.6.0/liblightdm-qt/power.cpp.systemd_login1_power lightdm-1.6.0/liblightdm-qt/power.cpp
---- lightdm-1.6.0/liblightdm-qt/power.cpp.systemd_login1_power	2013-03-05 20:40:10.000000000 -0600
-+++ lightdm-1.6.0/liblightdm-qt/power.cpp	2013-06-20 15:08:05.585054280 -0500
+diff -up lightdm-1.5.1/liblightdm-qt/power.cpp.systemd_login1_power lightdm-1.5.1/liblightdm-qt/power.cpp
+--- lightdm-1.5.1/liblightdm-qt/power.cpp.systemd_login1_power	2013-03-05 20:40:10.000000000 -0600
++++ lightdm-1.5.1/liblightdm-qt/power.cpp	2013-03-09 11:36:47.140559838 -0600
 @@ -15,6 +15,7 @@
  #include <QtCore/QVariant>
  #include <QtDBus/QDBusInterface>
diff --git a/lightdm.spec b/lightdm.spec
index e7c6692..c41739b 100644
--- a/lightdm.spec
+++ b/lightdm.spec
@@ -9,7 +9,7 @@
 Name:    lightdm
 Summary: Lightweight Display Manager
 Version: 1.6.0
-Release: 10%{?dist}
+Release: 9%{?dist}
 
 # library/bindings are LGPLv2 or LGPLv3, the rest GPLv3+
 License: (LGPLv2 or LGPLv3) and GPLv3+
@@ -34,7 +34,7 @@ Patch12: lightdm-1.6.0-no_dmrc_save.patch
 
 ## upstreamable patches
 # initial support for org.freedesktop.login1 powerOff/Reboot actions
-Patch50: lightdm-1.6.0-systemd_login1_power.patch
+Patch50: lightdm-1.5.1-systemd_login1_power.patch
 # gtkdoc introdpsection dup's CFLAGS/LDFLAGS, breaks in a hardened build
 Patch51: lightdm-1.6.0-gtkdoc_dup_flags.patch
 
@@ -270,9 +270,6 @@ fi
 
 
 %changelog
-* Thu Jun 20 2013 Rex Dieter <rdieter at fedoraproject.org> 1.6.0-10
-- fix systemd-logind support in -gobject bindings (#973618)
-
 * Thu May 23 2013 Rex Dieter <rdieter at fedoraproject.org> 1.6.0-9
 - really apply no_dmrc_save.patch (#963238)
 


More information about the scm-commits mailing list