From 51a096b698eed4f79c58fe1dbf3fa75f0d46c3cc Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 7 Nov 2008 17:12:07 +0000 Subject: [PATCH] - add some more debug spew to help debug a problem jlaska is having --- plymouth-0.6.0-more-debug.patch | 87 +++++++++++++++++++++++++++++++++ plymouth.spec | 12 +++-- 2 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 plymouth-0.6.0-more-debug.patch diff --git a/plymouth-0.6.0-more-debug.patch b/plymouth-0.6.0-more-debug.patch new file mode 100644 index 0000000..597f423 --- /dev/null +++ b/plymouth-0.6.0-more-debug.patch @@ -0,0 +1,87 @@ +diff -up plymouth-0.6.0/src/libplybootsplash/ply-window.c.more-debug plymouth-0.6.0/src/libplybootsplash/ply-window.c +--- plymouth-0.6.0/src/libplybootsplash/ply-window.c.more-debug 2008-11-07 12:08:25.000000000 -0500 ++++ plymouth-0.6.0/src/libplybootsplash/ply-window.c 2008-11-07 12:10:04.000000000 -0500 +@@ -493,7 +493,10 @@ ply_window_open (ply_window_t *window) + window->vt_number = get_active_vt (); + + if (readlink ("/proc/self/fd/0", tty_name, sizeof (tty_name) - 1) < 0) +- return false; ++ { ++ ply_trace ("could not read tty name of fd 0"); ++ return false; ++ } + + window->tty_name = strdup (tty_name); + } +@@ -503,7 +506,10 @@ ply_window_open (ply_window_t *window) + window->tty_fd = open (window->tty_name, O_RDWR | O_NOCTTY); + + if (window->tty_fd < 0) +- return false; ++ { ++ ply_trace ("could not open %s : %m", window->tty_name); ++ return false; ++ } + + if (!ply_window_set_unbuffered_input (window)) + ply_trace ("window '%s' will be line buffered", window->tty_name); +diff -up plymouth-0.6.0/src/main.c.more-debug plymouth-0.6.0/src/main.c +--- plymouth-0.6.0/src/main.c.more-debug 2008-11-07 12:01:46.000000000 -0500 ++++ plymouth-0.6.0/src/main.c 2008-11-07 12:08:16.000000000 -0500 +@@ -220,6 +220,8 @@ has_open_window (state_t *state) + { + ply_list_node_t *node; + ++ ply_trace ("checking for open windows"); ++ + node = ply_list_get_first_node (state->windows); + while (node != NULL) + { +@@ -231,7 +233,22 @@ has_open_window (state_t *state) + window = ply_list_node_get_data (node); + + if (ply_window_is_open (window)) +- return true; ++ { ++ int fd; ++ const char *name; ++ ++ fd = ply_window_get_tty_fd (window); ++ ++ if (fd >= 0) ++ name = ttyname (fd); ++ else ++ name = NULL; ++ ++ ply_trace ("window %s%sis open", ++ name != NULL? name : "", ++ name != NULL? " " : ""); ++ return true; ++ } + + node = next_node; + } +@@ -324,11 +341,22 @@ close_windows (state_t *state) + static void + on_show_splash (state_t *state) + { ++ bool has_open_window; ++ + open_windows (state); + +- if (!state->is_redirected && state->ptmx >= 0) ++ has_open_window = has_open_window (state); ++ ++ if (!state->is_redirected && state->ptmx >= 0 && has_open_window) + state->is_redirected = attach_to_running_session (state); + ++ if (!has_open_window && state->is_redirected) ++ { ++ ply_trace ("no open windows, detaching session"); ++ ply_terminal_session_detach (state->session); ++ state->is_redirected = false; ++ } ++ + if (plymouth_should_show_default_splash (state)) + show_default_splash (state); + else diff --git a/plymouth.spec b/plymouth.spec index 78aba1b..a2c0468 100644 --- a/plymouth.spec +++ b/plymouth.spec @@ -5,13 +5,11 @@ Summary: Plymouth Graphical Boot Animation and Logger Name: plymouth Version: 0.6.0 -Release: 0.2008.11.06.2%{?dist} +Release: 0.2008.11.06.3%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://freedesktop.org/software/plymouth/releases/%{name}-%{version}.tar.bz2 Source1: boot-duration -Patch0: plymouth-allow-passing-plugin.patch -Patch1: plymouth-0.6.0-fix-switchroot-failed.patch URL: http://freedesktop.org/software/plymouth/releases BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -24,6 +22,10 @@ Requires: system-plymouth-plugin >= %{version}-%{release} Requires(post): plymouth-scripts Requires: initscripts >= 8.83-1 +Patch0: plymouth-allow-passing-plugin.patch +Patch1: plymouth-0.6.0-fix-switchroot-failed.patch +Patch2: plymouth-0.6.0-more-debug.patch + %description Plymouth provides an attractive graphical boot animation in place of the text messages that normally get shown. Text @@ -156,6 +158,7 @@ where the graphical plugin's dependencies are undesirable. %setup -q %patch0 -p1 -b .allow-passing-plugin %patch1 -p1 -b .fix-switchroot-failed +%patch2 -p1 -b .more-debug %build %configure --enable-tracing --disable-tests --without-boot-entry \ @@ -308,6 +311,9 @@ fi %defattr(-, root, root) %changelog +* Thu Nov 6 2008 Ray Strode 0.6.0-0.2008.11.06.3 +- add some more debug spew to help debug a problem jlaska is having + * Thu Nov 6 2008 Ray Strode 0.6.0-0.2008.11.06.2 - show details plugin on --hide-splash so people can see why the splash got hidden.