forked from rpms/plymouth
- Fix feedback loop with plymouth:debug
- Move patches upstream - Improve comet animation
This commit is contained in:
parent
daa7389393
commit
b47d7f044d
@ -1,64 +0,0 @@
|
||||
diff -up plymouth-0.6.0/src/main.c.fix-switchroot-failed plymouth-0.6.0/src/main.c
|
||||
--- plymouth-0.6.0/src/main.c.fix-switchroot-failed 2008-11-06 10:43:41.000000000 -0500
|
||||
+++ plymouth-0.6.0/src/main.c 2008-11-06 18:12:51.000000000 -0500
|
||||
@@ -77,6 +77,7 @@ static ply_window_t *create_window (stat
|
||||
const char *tty_name);
|
||||
|
||||
static bool attach_to_running_session (state_t *state);
|
||||
+static void on_escape_pressed (state_t *state);
|
||||
|
||||
static void
|
||||
on_session_output (state_t *state,
|
||||
@@ -171,8 +172,11 @@ on_newroot (state_t *state,
|
||||
chdir(root_dir);
|
||||
chroot(".");
|
||||
chdir("/");
|
||||
- ply_progress_load_cache (state->progress);
|
||||
- ply_boot_splash_root_mounted (state->boot_splash);
|
||||
+ if (state->boot_splash != NULL)
|
||||
+ {
|
||||
+ ply_progress_load_cache (state->progress);
|
||||
+ ply_boot_splash_root_mounted (state->boot_splash);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -356,6 +360,8 @@ on_hide_splash (state_t *state)
|
||||
{
|
||||
|
||||
ply_trace ("hiding boot splash");
|
||||
+ state->showing_details = false;
|
||||
+ on_escape_pressed (state);
|
||||
if (state->boot_splash != NULL)
|
||||
ply_boot_splash_hide (state->boot_splash);
|
||||
|
||||
@@ -384,11 +390,12 @@ on_quit (state_t *state,
|
||||
if (state->boot_splash != NULL)
|
||||
{
|
||||
if (!retain_splash)
|
||||
- on_hide_splash (state);
|
||||
- else
|
||||
- quit_splash (state);
|
||||
- ply_boot_splash_free (state->boot_splash);
|
||||
- state->boot_splash = NULL;
|
||||
+ {
|
||||
+ if (state->boot_splash != NULL)
|
||||
+ ply_boot_splash_hide (state->boot_splash);
|
||||
+ }
|
||||
+
|
||||
+ quit_splash (state);
|
||||
}
|
||||
ply_trace ("exiting event loop");
|
||||
ply_event_loop_exit (state->loop, 0);
|
||||
diff -up plymouth-0.6.0/src/plugins/splash/details/plugin.c.fix-switchroot-failed plymouth-0.6.0/src/plugins/splash/details/plugin.c
|
||||
--- plymouth-0.6.0/src/plugins/splash/details/plugin.c.fix-switchroot-failed 2008-11-06 18:25:43.000000000 -0500
|
||||
+++ plymouth-0.6.0/src/plugins/splash/details/plugin.c 2008-11-06 18:25:47.000000000 -0500
|
||||
@@ -231,8 +231,6 @@ static void
|
||||
uninitialize_window (ply_window_t *window,
|
||||
ply_boot_splash_plugin_t *plugin)
|
||||
{
|
||||
- ply_window_clear_screen (window);
|
||||
-
|
||||
ply_window_set_keyboard_input_handler (window, NULL, NULL);
|
||||
ply_window_set_backspace_handler (window, NULL, NULL);
|
||||
ply_window_set_enter_handler (window, NULL, NULL);
|
@ -1,116 +0,0 @@
|
||||
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-05 17:15:29.000000000 -0500
|
||||
+++ plymouth-0.6.0/src/libplybootsplash/ply-window.c 2008-11-07 13:49:47.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 13:49:47.000000000 -0500
|
||||
+++ plymouth-0.6.0/src/main.c 2008-11-10 00:27:02.000000000 -0500
|
||||
@@ -64,6 +64,7 @@ typedef struct
|
||||
uint32_t showing_details : 1;
|
||||
uint32_t system_initialized : 1;
|
||||
uint32_t is_redirected : 1;
|
||||
+ uint32_t is_attached : 1;
|
||||
|
||||
char *console;
|
||||
|
||||
@@ -78,6 +79,7 @@ static ply_window_t *create_window (stat
|
||||
|
||||
static bool attach_to_running_session (state_t *state);
|
||||
static void on_escape_pressed (state_t *state);
|
||||
+static bool has_open_window (state_t *state);
|
||||
|
||||
static void
|
||||
on_session_output (state_t *state,
|
||||
@@ -220,6 +222,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 +235,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,10 +343,21 @@ close_windows (state_t *state)
|
||||
static void
|
||||
on_show_splash (state_t *state)
|
||||
{
|
||||
+ bool has_window;
|
||||
+
|
||||
open_windows (state);
|
||||
|
||||
- if (!state->is_redirected && state->ptmx >= 0)
|
||||
- state->is_redirected = attach_to_running_session (state);
|
||||
+ has_window = has_open_window (state);
|
||||
+
|
||||
+ if (!state->is_attached && state->ptmx >= 0 && has_window)
|
||||
+ state->is_attached = attach_to_running_session (state);
|
||||
+
|
||||
+ if (!has_window && state->is_attached)
|
||||
+ {
|
||||
+ ply_trace ("no open windows, detaching session");
|
||||
+ ply_terminal_session_detach (state->session);
|
||||
+ state->is_attached = false;
|
||||
+ }
|
||||
|
||||
if (plymouth_should_show_default_splash (state))
|
||||
show_default_splash (state);
|
||||
@@ -581,10 +611,12 @@ attach_to_running_session (state_t *stat
|
||||
ply_restore_errno ();
|
||||
|
||||
state->is_redirected = false;
|
||||
+ state->is_attached = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
state->is_redirected = should_be_redirected;
|
||||
+ state->is_attached = true;
|
||||
state->session = session;
|
||||
|
||||
return true;
|
@ -1,41 +0,0 @@
|
||||
diff --git a/scripts/plymouth-populate-initrd.in b/scripts/plymouth-populate-initrd.in
|
||||
index e9db1b9..cc640e5 100755
|
||||
--- a/scripts/plymouth-populate-initrd.in
|
||||
+++ b/scripts/plymouth-populate-initrd.in
|
||||
@@ -10,6 +10,7 @@
|
||||
[ -z "$BINDIR" ] && BINDIR="/usr/bin"
|
||||
[ -z "$GRUB_MENU_TITLE" ] && GRUB_MENU_TITLE="Graphical Bootup"
|
||||
[ -z "$PLYMOUTH_LOGO_FILE" ] && PLYMOUTH_LOGO_FILE="@logofile@"
|
||||
+[ -z "$PLYMOUTH_PLUGIN_NAME" ] && PLYMOUTH_PLUGIN_NAME=$(plymouth-set-default-plugin)
|
||||
|
||||
if [ -f "${LIBEXECDIR}/initrd-functions" ]; then
|
||||
. "${LIBEXECDIR}/initrd-functions"
|
||||
@@ -63,22 +64,20 @@ inst ${PLYMOUTH_LOGO_FILE} $INITRDDIR
|
||||
inst /etc/system-release $INITRDDIR
|
||||
mkdir -p ${INITRDDIR}${DATADIR}/plymouth
|
||||
|
||||
-PLUGIN_NAME=$(plymouth-set-default-plugin)
|
||||
-
|
||||
-if [ -z "$PLUGIN_NAME" ]; then
|
||||
+if [ -z "$PLYMOUTH_PLUGIN_NAME" ]; then
|
||||
echo "No default plymouth plugin is set" > /dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
|
||||
-if [ ! -f ${LIBDIR}/plymouth/${PLUGIN_NAME}.so ]; then
|
||||
- echo "The default plymouth plugin (${PLUGIN_NAME}) doesn't exist" > /dev/stderr
|
||||
+if [ ! -f ${LIBDIR}/plymouth/${PLYMOUTH_PLUGIN_NAME}.so ]; then
|
||||
+ echo "The default plymouth plugin (${PLYMOUTH_PLUGIN_NAME}) doesn't exist" > /dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
|
||||
-inst ${LIBDIR}/plymouth/${PLUGIN_NAME}.so $INITRDDIR
|
||||
+inst ${LIBDIR}/plymouth/${PLYMOUTH_PLUGIN_NAME}.so $INITRDDIR
|
||||
inst ${LIBDIR}/plymouth/default.so $INITRDDIR
|
||||
-if [ -d ${DATADIR}/plymouth/${PLUGIN_NAME} ]; then
|
||||
- for x in ${DATADIR}/plymouth/${PLUGIN_NAME}/* ; do
|
||||
+if [ -d ${DATADIR}/plymouth/${PLYMOUTH_PLUGIN_NAME} ]; then
|
||||
+ for x in ${DATADIR}/plymouth/${PLYMOUTH_PLUGIN_NAME}/* ; do
|
||||
[ ! -f "$x" ] && break
|
||||
inst $x $INITRDDIR
|
||||
done
|
@ -156,9 +156,6 @@ where the graphical plugin's dependencies are undesirable.
|
||||
|
||||
%prep
|
||||
%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 \
|
||||
|
Loading…
Reference in New Issue
Block a user