[gdm] Don't enable debugging by default if the version is "unstable"



commit cc62c15832ee4e2eeff336de4dff76d7f718f432
Author: Colin Walters <walters verbum org>
Date:   Fri Nov 22 15:19:21 2013 -0500

    Don't enable debugging by default if the version is "unstable"
    
    I'm open to negotiation for this, but basically...gdm is at
    present second only to the kernel in the sheer amount of spew
    it emits - when the version is "unstable".  But it always will
    be for Continuous.
    
    Nowadays of course, I think Continuous helps act as a testing system
    for GDM that obviates a lot of the need for lots of debugging info for
    gdm during "unstable" cycles.
    
    I suspect that we will over time add other informational messages at
    strategic points by default; this patch is not the end of the story.
    It's a new beginning.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=715037

 common/gdm-common.c               |   21 ---------------------
 common/gdm-common.h               |    2 --
 daemon/main.c                     |    8 +-------
 daemon/session-worker-main.c      |    8 +-------
 daemon/simple-slave-main.c        |    8 +-------
 daemon/xdmcp-chooser-slave-main.c |    8 +-------
 6 files changed, 4 insertions(+), 51 deletions(-)
---
diff --git a/common/gdm-common.c b/common/gdm-common.c
index ae6129c..99f9857 100644
--- a/common/gdm-common.c
+++ b/common/gdm-common.c
@@ -45,27 +45,6 @@ gdm_make_temp_dir (char *template)
 }
 
 gboolean
-gdm_is_version_unstable (void)
-{
-        char   **versions;
-        gboolean unstable;
-
-        unstable = FALSE;
-
-        versions = g_strsplit (VERSION, ".", 3);
-        if (versions && versions [0] && versions [1]) {
-                int major;
-                major = atoi (versions [1]);
-                if ((major % 2) != 0) {
-                        unstable = TRUE;
-                }
-        }
-        g_strfreev (versions);
-
-        return unstable;
-}
-
-gboolean
 gdm_clear_close_on_exec_flag (int fd)
 {
         int flags;
diff --git a/common/gdm-common.h b/common/gdm-common.h
index f9033aa..be4d103 100644
--- a/common/gdm-common.h
+++ b/common/gdm-common.h
@@ -38,8 +38,6 @@
 
 G_BEGIN_DECLS
 
-gboolean       gdm_is_version_unstable            (void);
-
 int            gdm_wait_on_pid           (int pid);
 int            gdm_wait_on_and_disown_pid (int pid,
                                            int timeout);
diff --git a/daemon/main.c b/daemon/main.c
index 7bd342d..b95802f 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -300,13 +300,7 @@ on_sigusr1_cb (gpointer user_data)
 static gboolean
 is_debug_set (void)
 {
-        gboolean debug = FALSE;
-
-        /* enable debugging for unstable builds */
-        if (gdm_is_version_unstable ()) {
-                return TRUE;
-        }
-
+        gboolean debug;
         gdm_settings_direct_get_boolean (GDM_KEY_DEBUG, &debug);
         return debug;
 }
diff --git a/daemon/session-worker-main.c b/daemon/session-worker-main.c
index 40cd08b..ede60c5 100644
--- a/daemon/session-worker-main.c
+++ b/daemon/session-worker-main.c
@@ -68,13 +68,7 @@ on_sigusr1_cb (gpointer user_data)
 static gboolean
 is_debug_set (void)
 {
-        gboolean debug = FALSE;
-
-        /* enable debugging for unstable builds */
-        if (gdm_is_version_unstable ()) {
-                return TRUE;
-        }
-
+        gboolean debug;
         gdm_settings_direct_get_boolean (GDM_KEY_DEBUG, &debug);
         return debug;
 }
diff --git a/daemon/simple-slave-main.c b/daemon/simple-slave-main.c
index 52fc9b0..5c6bfa2 100644
--- a/daemon/simple-slave-main.c
+++ b/daemon/simple-slave-main.c
@@ -101,13 +101,7 @@ on_slave_stopped (GdmSlave   *slave,
 static gboolean
 is_debug_set (void)
 {
-        gboolean debug = FALSE;
-
-        /* enable debugging for unstable builds */
-        if (gdm_is_version_unstable ()) {
-                return TRUE;
-        }
-
+        gboolean debug;
         gdm_settings_direct_get_boolean (GDM_KEY_DEBUG, &debug);
         return debug;
 }
diff --git a/daemon/xdmcp-chooser-slave-main.c b/daemon/xdmcp-chooser-slave-main.c
index 0c122dc..302466b 100644
--- a/daemon/xdmcp-chooser-slave-main.c
+++ b/daemon/xdmcp-chooser-slave-main.c
@@ -100,13 +100,7 @@ on_sigusr2_cb (gpointer user_data)
 static gboolean
 is_debug_set (void)
 {
-        gboolean debug = FALSE;
-
-        /* enable debugging for unstable builds */
-        if (gdm_is_version_unstable ()) {
-                return TRUE;
-        }
-
+        gboolean debug;
         gdm_settings_direct_get_boolean (GDM_KEY_DEBUG, &debug);
         return debug;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]