rpms/gdm/F-9 gdm-silence-debugging.patch, NONE, 1.1 gdm.spec, 1.383, 1.384
William Jon McCann (mccann)
fedora-extras-commits at redhat.com
Tue May 6 18:36:04 UTC 2008
- Previous message (by thread): rpms/kdebase/devel .cvsignore, 1.67, 1.68 kdebase.spec, 1.318, 1.319 sources, 1.90, 1.91 kdebase-4.0.3-kde#160422.patch, 1.2, NONE kdebase-4.0.3-nspluginviewer.patch, 1.1, NONE
- Next message (by thread): rpms/python-augeas/F-9 python-augeas.spec,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mccann
Update of /cvs/pkgs/rpms/gdm/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1921
Modified Files:
gdm.spec
Added Files:
gdm-silence-debugging.patch
Log Message:
- Silence debugging output when --debug isn't used
gdm-silence-debugging.patch:
--- NEW FILE gdm-silence-debugging.patch ---
Index: gdm/common/gdm-log.c
===================================================================
--- gdm/common/gdm-log.c (revision 6215)
+++ gdm/common/gdm-log.c (working copy)
@@ -78,10 +78,11 @@ log_level_to_priority_and_prefix (GLogLe
* to ensure it is seen in a log */
if (syslog_levels & G_LOG_LEVEL_DEBUG) {
priority = LOG_WARNING;
+ prefix = "DEBUG(+)";
} else {
priority = LOG_DEBUG;
+ prefix = "DEBUG";
}
- prefix = "DEBUG";
break;
default:
priority = LOG_DEBUG;
@@ -169,7 +170,9 @@ gdm_log_set_debug (gboolean debug)
{
if (debug) {
syslog_levels |= G_LOG_LEVEL_DEBUG;
+ g_debug ("Enabling debugging");
} else {
+ g_debug ("Disabling debugging");
syslog_levels &= ~G_LOG_LEVEL_DEBUG;
}
}
Index: gdm/daemon/session-worker-main.c
===================================================================
--- gdm/daemon/session-worker-main.c (revision 6215)
+++ gdm/daemon/session-worker-main.c (working copy)
@@ -98,6 +98,8 @@ signal_cb (int signo,
*/
ret = TRUE;
+ gdm_log_toggle_debug ();
+
break;
default:
@@ -110,6 +112,17 @@ signal_cb (int signo,
return ret;
}
+static gboolean
+is_debug_set (gboolean arg)
+{
+ /* enable debugging for unstable builds */
+ if (gdm_is_version_unstable ()) {
+ return TRUE;
+ }
+
+ return arg;
+}
+
int
main (int argc,
char **argv)
@@ -119,7 +132,9 @@ main (int argc,
GdmSessionWorker *worker;
GdmSignalHandler *signal_handler;
const char *address;
+ static gboolean debug = FALSE;
static GOptionEntry entries [] = {
+ { "debug", 0, 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging code"), NULL },
{ NULL }
};
@@ -138,7 +153,7 @@ main (int argc,
g_option_context_free (context);
gdm_log_init ();
- gdm_log_set_debug (TRUE);
+ gdm_log_set_debug (is_debug_set (debug));
address = g_getenv ("GDM_SESSION_DBUS_ADDRESS");
if (address == NULL) {
Index: gdm/daemon/xdmcp-chooser-slave-main.c
===================================================================
--- gdm/daemon/xdmcp-chooser-slave-main.c (revision 6215)
+++ gdm/daemon/xdmcp-chooser-slave-main.c (working copy)
@@ -116,11 +116,19 @@ signal_cb (int signo,
case SIGUSR1:
g_debug ("Got USR1 signal");
- /* FIXME:
- * Play with log levels or something
- */
+ /* we get this from xorg - can't use for anything else */
ret = TRUE;
+ gdm_log_toggle_debug ();
+
+ break;
+
+ case SIGUSR2:
+ g_debug ("Got USR2 signal");
+ ret = TRUE;
+
+ gdm_log_toggle_debug ();
+
break;
default:
@@ -142,6 +150,17 @@ on_slave_stopped (GdmSlave *slave,
g_main_loop_quit (main_loop);
}
+static gboolean
+is_debug_set (gboolean arg)
+{
+ /* enable debugging for unstable builds */
+ if (gdm_is_version_unstable ()) {
+ return TRUE;
+ }
+
+ return arg;
+}
+
int
main (int argc,
char **argv)
@@ -151,8 +170,10 @@ main (int argc,
DBusGConnection *connection;
GdmSlave *slave;
static char *display_id = NULL;
+ static gboolean debug = FALSE;
GdmSignalHandler *signal_handler;
static GOptionEntry entries [] = {
+ { "debug", 0, 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging code"), NULL },
{ "display-id", 0, 0, G_OPTION_ARG_STRING, &display_id, N_("Display ID"), N_("id") },
{ NULL }
};
@@ -178,7 +199,7 @@ main (int argc,
gdm_log_init ();
- gdm_log_set_debug (TRUE);
+ gdm_log_set_debug (is_debug_set (debug));
if (display_id == NULL) {
g_critical ("No display ID set");
@@ -198,6 +219,7 @@ main (int argc,
gdm_signal_handler_add (signal_handler, SIGSEGV, signal_cb, NULL);
gdm_signal_handler_add (signal_handler, SIGABRT, signal_cb, NULL);
gdm_signal_handler_add (signal_handler, SIGUSR1, signal_cb, NULL);
+ gdm_signal_handler_add (signal_handler, SIGUSR2, signal_cb, NULL);
slave = gdm_xdmcp_chooser_slave_new (display_id);
if (slave == NULL) {
Index: gdm/daemon/product-slave-main.c
===================================================================
--- gdm/daemon/product-slave-main.c (revision 6215)
+++ gdm/daemon/product-slave-main.c (working copy)
@@ -116,13 +116,19 @@ signal_cb (int signo,
case SIGUSR1:
g_debug ("Got USR1 signal");
- /* FIXME:
- * Play with log levels or something
- */
+ /* we get this from xorg - can't use for anything else */
ret = TRUE;
break;
+ case SIGUSR2:
+ g_debug ("Got USR2 signal");
+ ret = TRUE;
+
+ gdm_log_toggle_debug ();
+
+ break;
+
default:
g_debug ("Caught unhandled signal %d", signo);
ret = TRUE;
@@ -142,6 +148,17 @@ on_slave_stopped (GdmSlave *slave,
g_main_loop_quit (main_loop);
}
+static gboolean
+is_debug_set (gboolean arg)
+{
+ /* enable debugging for unstable builds */
+ if (gdm_is_version_unstable ()) {
+ return TRUE;
+ }
+
+ return arg;
+}
+
int
main (int argc,
char **argv)
@@ -151,8 +168,10 @@ main (int argc,
DBusGConnection *connection;
GdmSlave *slave;
static char *display_id = NULL;
+ static gboolean debug = FALSE;
GdmSignalHandler *signal_handler;
static GOptionEntry entries [] = {
+ { "debug", 0, 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging code"), NULL },
{ "display-id", 0, 0, G_OPTION_ARG_STRING, &display_id, N_("Display ID"), N_("id") },
{ NULL }
};
@@ -178,7 +197,7 @@ main (int argc,
gdm_log_init ();
- gdm_log_set_debug (TRUE);
+ gdm_log_set_debug (is_debug_set (debug));
if (display_id == NULL) {
g_critical ("No display ID set");
@@ -198,6 +217,7 @@ main (int argc,
gdm_signal_handler_add (signal_handler, SIGSEGV, signal_cb, NULL);
gdm_signal_handler_add (signal_handler, SIGABRT, signal_cb, NULL);
gdm_signal_handler_add (signal_handler, SIGUSR1, signal_cb, NULL);
+ gdm_signal_handler_add (signal_handler, SIGUSR2, signal_cb, NULL);
slave = gdm_product_slave_new (display_id);
if (slave == NULL) {
Index: gdm/daemon/simple-slave-main.c
===================================================================
--- gdm/daemon/simple-slave-main.c (revision 6215)
+++ gdm/daemon/simple-slave-main.c (working copy)
@@ -118,13 +118,19 @@ signal_cb (int signo,
case SIGUSR1:
g_debug ("Got USR1 signal");
- /* FIXME:
- * Play with log levels or something
- */
+ /* we get this from xorg - can't use for anything else */
ret = TRUE;
break;
+ case SIGUSR2:
+ g_debug ("Got USR2 signal");
+ ret = TRUE;
+
+ gdm_log_toggle_debug ();
+
+ break;
+
default:
g_debug ("Caught unhandled signal %d", signo);
ret = TRUE;
@@ -144,6 +150,17 @@ on_slave_stopped (GdmSlave *slave,
g_main_loop_quit (main_loop);
}
+static gboolean
+is_debug_set (gboolean arg)
+{
+ /* enable debugging for unstable builds */
+ if (gdm_is_version_unstable ()) {
+ return TRUE;
+ }
+
+ return arg;
+}
+
int
main (int argc,
char **argv)
@@ -153,8 +170,10 @@ main (int argc,
DBusGConnection *connection;
GdmSlave *slave;
static char *display_id = NULL;
+ static gboolean debug = FALSE;
GdmSignalHandler *signal_handler;
static GOptionEntry entries [] = {
+ { "debug", 0, 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging code"), NULL },
{ "display-id", 0, 0, G_OPTION_ARG_STRING, &display_id, N_("Display ID"), N_("id") },
{ NULL }
};
@@ -183,7 +202,7 @@ main (int argc,
gdm_log_init ();
- gdm_log_set_debug (TRUE);
+ gdm_log_set_debug (is_debug_set (debug));
if (display_id == NULL) {
g_critical ("No display ID set");
@@ -208,6 +227,7 @@ main (int argc,
gdm_signal_handler_add (signal_handler, SIGSEGV, signal_cb, NULL);
gdm_signal_handler_add (signal_handler, SIGABRT, signal_cb, NULL);
gdm_signal_handler_add (signal_handler, SIGUSR1, signal_cb, NULL);
+ gdm_signal_handler_add (signal_handler, SIGUSR2, signal_cb, NULL);
slave = gdm_simple_slave_new (display_id);
if (slave == NULL) {
Index: gdm/daemon/factory-slave-main.c
===================================================================
--- gdm/daemon/factory-slave-main.c (revision 6215)
+++ gdm/daemon/factory-slave-main.c (working copy)
@@ -121,6 +121,8 @@ signal_cb (int signo,
*/
ret = TRUE;
+ gdm_log_toggle_debug ();
+
break;
default:
@@ -142,6 +144,17 @@ on_slave_stopped (GdmSlave *slave,
g_main_loop_quit (main_loop);
}
+static gboolean
+is_debug_set (gboolean arg)
+{
+ /* enable debugging for unstable builds */
+ if (gdm_is_version_unstable ()) {
+ return TRUE;
+ }
+
+ return arg;
+}
+
int
main (int argc,
char **argv)
@@ -151,8 +164,10 @@ main (int argc,
DBusGConnection *connection;
GdmSlave *slave;
static char *display_id = NULL;
+ static gboolean debug = FALSE;
GdmSignalHandler *signal_handler;
static GOptionEntry entries [] = {
+ { "debug", 0, 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging code"), NULL },
{ "display-id", 0, 0, G_OPTION_ARG_STRING, &display_id, N_("Display ID"), N_("id") },
{ NULL }
};
@@ -178,7 +193,7 @@ main (int argc,
gdm_log_init ();
- gdm_log_set_debug (TRUE);
+ gdm_log_set_debug (is_debug_set (debug));
if (display_id == NULL) {
g_critical ("No display ID set");
@@ -198,6 +213,7 @@ main (int argc,
gdm_signal_handler_add (signal_handler, SIGSEGV, signal_cb, NULL);
gdm_signal_handler_add (signal_handler, SIGABRT, signal_cb, NULL);
gdm_signal_handler_add (signal_handler, SIGUSR1, signal_cb, NULL);
+ gdm_signal_handler_add (signal_handler, SIGUSR2, signal_cb, NULL);
slave = gdm_factory_slave_new (display_id);
if (slave == NULL) {
Index: gdm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdm/F-9/gdm.spec,v
retrieving revision 1.383
retrieving revision 1.384
diff -u -r1.383 -r1.384
--- gdm.spec 2 May 2008 02:35:18 -0000 1.383
+++ gdm.spec 6 May 2008 18:35:14 -0000 1.384
@@ -16,7 +16,7 @@
Summary: The GNOME Display Manager
Name: gdm
Version: 2.22.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Epoch: 1
License: GPLv2+
Group: User Interface/X
@@ -76,6 +76,7 @@
Requires: audit-libs >= %{libauditver}
Patch1: xkb-groups.patch
+Patch2: gdm-silence-debugging.patch
Patch99: gdm-2.21.8-fedora-logo.patch
%package user-switch-applet
@@ -96,6 +97,7 @@
%prep
%setup -q
%patch1 -p1 -b .xkb-groups
+%patch2 -p1 -b .silence-debugging
%patch99 -p1 -b .fedora-logo
%build
@@ -293,6 +295,9 @@
%{_datadir}/gnome-2.0/ui/GNOME_FastUserSwitchApplet.xml
%changelog
+* Tue May 6 2008 Jon McCann <jmccann at redhat.com> - 1:2.22.0-2
+- Silence debugging output when --debug isn't used
+
* Thu May 1 2008 Jon McCann <jmccann at redhat.com> - 1:2.22.0-1
- Update to 2.22.0
- Fix restarting after system bus restart
- Previous message (by thread): rpms/kdebase/devel .cvsignore, 1.67, 1.68 kdebase.spec, 1.318, 1.319 sources, 1.90, 1.91 kdebase-4.0.3-kde#160422.patch, 1.2, NONE kdebase-4.0.3-nspluginviewer.patch, 1.1, NONE
- Next message (by thread): rpms/python-augeas/F-9 python-augeas.spec,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list