From: "Grégoire Sutre" <gregoire.sutre@labri.fr>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Config file generation failure on Linux (gettext.sh)
Date: Mon, 04 Jan 2010 00:16:03 +0100 [thread overview]
Message-ID: <4B412533.10207@labri.fr> (raw)
In-Reply-To: <20100103165519.GI27698@thorin>
[-- Attachment #1: Type: text/plain, Size: 478 bytes --]
Robert Millan wrote:
> On Sun, Jan 03, 2010 at 05:50:08PM +0100, Robert Millan wrote:
>> As long as the script complains appropiately and exits non-zero if gettext
>> was installed, I would consider it robust (keep in mind grub.cfg isn't
> ^^^
>
> I meant "wasn't" of course.
Ok, here is the new patch. This one also takes care of 10_kfreebsd, as
it uses gettext in the same way as 10_linux. Please let me know if I
missed something.
Thanks,
Grégoire
[-- Attachment #2: patch-10_linux-gettext --]
[-- Type: text/plain, Size: 2098 bytes --]
--- configure.ac.orig 2010-01-03 23:34:44.000000000 +0100
+++ configure.ac
@@ -179,6 +179,7 @@ test "x$GCC" = xyes || AC_MSG_ERROR([GCC
AC_GNU_SOURCE
AM_GNU_GETTEXT([external])
+AC_PATH_PROG([GETTEXTBIN], [gettext], [echo])
AC_SYS_LARGEFILE
# Identify characteristics of the host architecture.
--- util/grub.d/10_kfreebsd.in.orig 2010-01-02 14:42:38.000000000 +0100
+++ util/grub.d/10_kfreebsd.in
@@ -20,9 +20,14 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
+gettext=@GETTEXTBIN@
. ${libdir}/grub/grub-mkconfig_lib
-. ${bindir}/gettext.sh
+if [ "x${gettext}" != "xecho" ] && ! test -x "${gettext}" ; then
+ echo "10_kfreebsd: error: \`${gettext}' is missing." >&2
+ exit 1
+fi
+
export TEXTDOMAIN=@PACKAGE@
export TEXTDOMAINDIR=@localedir@
@@ -37,7 +42,7 @@ kfreebsd_entry ()
version="$2"
recovery="$3" # not used yet
args="$4" # not used yet
- title="$(gettext "%s, with kFreeBSD %s")"
+ title="$(${gettext} "%s, with kFreeBSD %s")"
printf "menuentry \"${title}\" {\n" "${os}" "${version}"
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
--- util/grub.d/10_linux.in.orig 2010-01-02 14:42:38.000000000 +0100
+++ util/grub.d/10_linux.in
@@ -20,9 +20,14 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
+gettext=@GETTEXTBIN@
. ${libdir}/grub/grub-mkconfig_lib
-. ${bindir}/gettext.sh
+if [ "x${gettext}" != "xecho" ] && ! test -x "${gettext}" ; then
+ echo "10_linux: error: \`${gettext}' is missing." >&2
+ exit 1
+fi
+
export TEXTDOMAIN=@PACKAGE@
export TEXTDOMAINDIR=@localedir@
@@ -54,9 +59,9 @@ linux_entry ()
recovery="$3"
args="$4"
if ${recovery} ; then
- title="$(gettext "%s, with Linux %s (recovery mode)")"
+ title="$(${gettext} "%s, with Linux %s (recovery mode)")"
else
- title="$(gettext "%s, with Linux %s")"
+ title="$(${gettext} "%s, with Linux %s")"
fi
printf "menuentry \"${title}\" {\n" "${os}" "${version}"
if [ -z "${prepare_boot_cache}" ]; then
prev parent reply other threads:[~2010-01-03 23:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-30 15:01 Config file generation failure on Linux Grégoire Sutre
2010-01-01 12:03 ` Robert Millan
2010-01-02 14:05 ` Config file generation failure on Linux (gettext.sh) Grégoire Sutre
2010-01-03 16:50 ` Robert Millan
2010-01-03 16:55 ` Robert Millan
2010-01-03 23:16 ` Grégoire Sutre [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B412533.10207@labri.fr \
--to=gregoire.sutre@labri.fr \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.