Skip to contentSkip to conversation

Allow background to be set when theme is set

PATCH In review Lin via Grub-devel 1 participant 3 messages Jun 13, 2024 – Nov 5, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow background to be set when theme is set

util/grub.d/00_header.in +1 -3
index 4e8f25702..f86b69bad 100644
@@ -263,9 +263,7 @@ EOF
 set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
 export theme
 EOF
-    fi
-
-    if [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
+    elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
 	    && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
 	gettext_printf "Found background: %s\n" "$GRUB_BACKGROUND" >&2
 	case "$GRUB_BACKGROUND" in 

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#1 lore raw
Quoted 5 lines · Lin

Hello, first time contributor here.
I'm not experienced with mailing lists and mailing patches so just let me know if I do anything wrong :)

Quoted 7 lines

This patch simply allows that if GRUB_BACKGROUND and GRUB_THEME is set at the same time, both pieces of code gets generated into grub.cfg by grub-mkconfig.

If a theme is loaded, the background image will be visible inside the console.

Already made my first mistake and got my patch reversed lol. Corrected patch is below.

Again, when setting a GRUB_THEME, the elif disallows the GRUB_BACKGROUND to be used, yet with my patch applied a set background image will not interfere with the theme, but only be visible as the background for the console when opened with 'c'.

Thanks,
Lin

util/grub.d/00_header.in +0 -0
index f86b69bad..4e8f25702 100644
@@ -263,7 +263,9 @@ EOF

 set theme=(\$root)make_system_path_relative_to_its_root $GRUB_THEME export theme
 EOF
-    elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
+    fi
+
+    if [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
         && is_path_readable_by_grub "$GRUB_BACKGROUND"; then gettext_printf "Found background: %s\n" "$GRUB_BACKGROUND" >&2 case "$GRUB_BACKGROUND" in

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#2 lore raw

RE: [External] : Re: [PATCH] Allow background to be set when theme is set

Hey,

So a few suggestions. You should use git send-email to send your patch. This will format the patch nicely and make it easier to apply your patch to the rest of the GRUB code. Also, when sending an update of your patch, instead of replying to the initial patch, you should send a separate email with an updated version number, i.e. [PATCH v2]. You will also need a signed-off-by at the end of your commit message for the patch.

Alec Brown

Quoted 43 lines · Lin
Quoted 5 lines · Lin

Hello, first time contributor here.
I'm not experienced with mailing lists and mailing patches so just let me know if I do anything wrong :)

Quoted 7 lines

This patch simply allows that if GRUB_BACKGROUND and GRUB_THEME is set at the same time, both pieces of code gets generated into grub.cfg by grub-mkconfig.

If a theme is loaded, the background image will be visible inside the console.

Already made my first mistake and got my patch reversed lol. Corrected patch is below.

Again, when setting a GRUB_THEME, the elif disallows the GRUB_BACKGROUND to be used, yet with my patch applied a set background image will not interfere with the theme, but only be visible as the background for the console when opened with 'c'.

Thanks,
Lin

util/grub.d/00_header.in +3 -1
index f86b69bad..4e8f25702 100644
@@ -263,7 +263,9 @@ EOF
  set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
  export theme
  EOF
-    elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
+    fi
+
+    if [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
          && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
      gettext_printf "Found background: %s\n" "$GRUB_BACKGROUND" >&2
      case "$GRUB_BACKGROUND" in
Quoted 6 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://urldefense.com/v3/__https://lists.gnu.org/mailman/listinfo/grub-
devel__;!!ACWV5N9M2RV99hQ!PLGidopsW7qPo_wRq33QaUvrp0eXPF- Qo0P_D2qJ8UL7kJdBXudmjssK0vWbpxFukgrhEoPThYgtOPZhaSDX$

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel