Accepting request 142244 from devel:openSUSE:Factory

Replace grub2-quote-messages-in-grub.cfg.patch with upstream commit. It makes it easier to sync with upstream sources in the future. (forwarded request 142232 from arvidjaar)

OBS-URL: https://build.opensuse.org/request/show/142244
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=51
This commit is contained in:
Stephan Kulow 2012-11-21 15:53:33 +00:00 committed by Git OBS Bridge
parent a8cae65aac
commit bb12fc3e7f
2 changed files with 68 additions and 48 deletions

View File

@ -9,94 +9,100 @@ Not all translated strings in grub.cfg were properly quoted. This
resulted in parser errors for languages that contained literal single resulted in parser errors for languages that contained literal single
quote in translations. quote in translations.
Additionally fix grub_quote function; it had too many levels of quoting Upstream commit 4558
(fixed upstream).
Index: grub-2.00/util/grub.d/10_hurd.in Index: grub-2.00/util/grub.d/10_hurd.in
=================================================================== ===================================================================
--- grub-2.00.orig/util/grub.d/10_hurd.in --- grub-2.00.orig/util/grub.d/10_hurd.in
+++ grub-2.00/util/grub.d/10_hurd.in +++ grub-2.00/util/grub.d/10_hurd.in
@@ -109,7 +109,7 @@ EOF @@ -117,7 +117,7 @@ EOF
fi
prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | sed -e "s/^/\t/"|sed "s/^/$submenu_indentation/"
- message="$(gettext_printf "Loading GNU Mach ...")"
+ message="$(gettext_printf "Loading GNU Mach ..." | grub_quote)"
if [ x$type = xrecovery ] ; then
opts="-s"
@@ -125,7 +125,7 @@ EOF
save_default_entry | sed -e "s/^/\t/"| sed "s/^/$submenu_indentation/"
fi
prepare_grub_to_access_device "${GRUB_DEVICE}" | sed -e "s/^/\t/"| sed "s/^/$submenu_indentation/"
- message="$(gettext_printf "Loading the Hurd ...")"
+ message="$(gettext_printf "Loading the Hurd ..." | grub_quote)"
if [ x$type = xrecovery ] ; then
opts= opts=
else fi
sed "s/^/$submenu_indentation/" << EOF
- echo '$message'
+ echo '$(echo "$message" | grub_quote)'
multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/} $opts ${GRUB_CMDLINE_GNUMACH}
EOF
@@ -133,7 +133,7 @@ EOF
fi
sed "s/^/$submenu_indentation/" << EOF
- echo '$message'
+ echo '$(echo "$message" | grub_quote)'
module /hurd/${hurd_fs}.static ${hurd_fs} $opts \\
--multiboot-command-line='\${kernel-command-line}' \\
--host-priv-port='\${host-port}' \\
Index: grub-2.00/util/grub.d/10_kfreebsd.in Index: grub-2.00/util/grub.d/10_kfreebsd.in
=================================================================== ===================================================================
--- grub-2.00.orig/util/grub.d/10_kfreebsd.in --- grub-2.00.orig/util/grub.d/10_kfreebsd.in
+++ grub-2.00/util/grub.d/10_kfreebsd.in +++ grub-2.00/util/grub.d/10_kfreebsd.in
@@ -98,7 +98,7 @@ kfreebsd_entry () @@ -100,7 +100,7 @@ kfreebsd_entry ()
fi
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/" printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
- message="$(gettext_printf "Loading kernel of FreeBSD %s ..." ${version})" message="$(gettext_printf "Loading kernel of FreeBSD %s ..." ${version})"
+ message="$(gettext_printf "Loading kernel of FreeBSD %s ..." ${version} | grub_quote)"
sed "s/^/$submenu_indentation/" << EOF sed "s/^/$submenu_indentation/" << EOF
echo '$message' - echo '$message'
+ echo '$(echo "$message" | grub_quote)'
kfreebsd ${rel_dirname}/${basename} ${args} kfreebsd ${rel_dirname}/${basename} ${args}
EOF
Index: grub-2.00/util/grub.d/10_linux.in Index: grub-2.00/util/grub.d/10_linux.in
=================================================================== ===================================================================
--- grub-2.00.orig/util/grub.d/10_linux.in --- grub-2.00.orig/util/grub.d/10_linux.in
+++ grub-2.00/util/grub.d/10_linux.in +++ grub-2.00/util/grub.d/10_linux.in
@@ -132,14 +132,14 @@ linux_entry () @@ -134,14 +134,14 @@ linux_entry ()
fi
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
fi fi
- message="$(gettext_printf "Loading Linux %s ..." ${version})" message="$(gettext_printf "Loading Linux %s ..." ${version})"
+ message="$(gettext_printf "Loading Linux %s ..." ${version} | grub_quote)"
sed "s/^/$submenu_indentation/" << EOF sed "s/^/$submenu_indentation/" << EOF
echo '$message' - echo '$message'
+ echo '$(echo "$message" | grub_quote)'
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ${args} linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ${args}
EOF EOF
if test -n "${initrd}" ; then if test -n "${initrd}" ; then
# TRANSLATORS: ramdisk isn't identifier. Should be translated. # TRANSLATORS: ramdisk isn't identifier. Should be translated.
- message="$(gettext_printf "Loading initial ramdisk ...")" message="$(gettext_printf "Loading initial ramdisk ...")"
+ message="$(gettext_printf "Loading initial ramdisk ..." | grub_quote)"
sed "s/^/$submenu_indentation/" << EOF sed "s/^/$submenu_indentation/" << EOF
echo '$message' - echo '$message'
+ echo '$(echo "$message" | grub_quote)'
initrd ${rel_dirname}/${initrd} initrd ${rel_dirname}/${initrd}
EOF
fi
Index: grub-2.00/util/grub.d/20_linux_xen.in Index: grub-2.00/util/grub.d/20_linux_xen.in
=================================================================== ===================================================================
--- grub-2.00.orig/util/grub.d/20_linux_xen.in --- grub-2.00.orig/util/grub.d/20_linux_xen.in
+++ grub-2.00/util/grub.d/20_linux_xen.in +++ grub-2.00/util/grub.d/20_linux_xen.in
@@ -117,8 +117,8 @@ linux_entry () @@ -120,16 +120,16 @@ linux_entry ()
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")" xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
fi lmessage="$(gettext_printf "Loading Linux %s ..." ${version})"
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
- xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
- lmessage="$(gettext_printf "Loading Linux %s ..." ${version})"
+ xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version} | grub_quote)"
+ lmessage="$(gettext_printf "Loading Linux %s ..." ${version} | grub_quote)"
sed "s/^/$submenu_indentation/" << EOF sed "s/^/$submenu_indentation/" << EOF
echo '$xmessage' - echo '$xmessage'
+ echo '$(echo "$xmessage" | grub_quote)'
multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args}
@@ -127,7 +127,7 @@ linux_entry () - echo '$lmessage'
+ echo '$(echo "$lmessage" | grub_quote)'
module ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
EOF EOF
if test -n "${initrd}" ; then if test -n "${initrd}" ; then
# TRANSLATORS: ramdisk isn't identifier. Should be translated. # TRANSLATORS: ramdisk isn't identifier. Should be translated.
- message="$(gettext_printf "Loading initial ramdisk ...")" message="$(gettext_printf "Loading initial ramdisk ...")"
+ message="$(gettext_printf "Loading initial ramdisk ..." | grub_quote)"
sed "s/^/$submenu_indentation/" << EOF sed "s/^/$submenu_indentation/" << EOF
echo '$message' - echo '$message'
+ echo '$(echo "$message" | grub_quote)'
module ${rel_dirname}/${initrd} module ${rel_dirname}/${initrd}
EOF
fi
Index: grub-2.00/util/grub-mkconfig_lib.in Index: grub-2.00/util/grub-mkconfig_lib.in
=================================================================== ===================================================================
--- grub-2.00.orig/util/grub-mkconfig_lib.in --- grub-2.00.orig/util/grub-mkconfig_lib.in
+++ grub-2.00/util/grub-mkconfig_lib.in +++ grub-2.00/util/grub-mkconfig_lib.in
@@ -265,7 +265,7 @@ version_find_latest () @@ -260,19 +260,19 @@ version_find_latest ()
echo "$version_find_latest_a"
}
-# One layer of quotation is eaten by "", the second by sed, and the third by
-# printf; so this turns ' into \'. Note that you must use the output of
+# One layer of quotation is eaten by "" and the second by
+# sed; so this turns ' into \'. Note that you must use the output of
# this function in a printf format string. # this function in a printf format string.
grub_quote () { grub_quote () {
@ -105,3 +111,12 @@ Index: grub-2.00/util/grub-mkconfig_lib.in
} }
gettext_quoted () { gettext_quoted () {
- gettext "$@" | sed "s/'/'\\\\\\\\''/g"
+ gettext "$@" | grub_quote
}
-# Run the first argument through gettext_quoted, and then pass that and all
+# Run the first argument through gettext, and then pass that and all
# remaining arguments to printf. This is a useful abbreviation and tends to
# be easier to type.
gettext_printf () {

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 20 16:14:50 UTC 2012 - arvidjaar@gmail.com
- update grub2-quote-messages-in-grub.cfg.patch to use upstream commit
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Nov 19 16:40:25 UTC 2012 - arvidjaar@gmail.com Mon Nov 19 16:40:25 UTC 2012 - arvidjaar@gmail.com