All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Grégoire Sutre" <gregoire.sutre@labri.fr>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Config file generation failure on Linux
Date: Wed, 30 Dec 2009 16:01:01 +0100	[thread overview]
Message-ID: <4B3B6B2D.70503@labri.fr> (raw)

Hi,

Config file generation with grub-mkconfig fails on Linux when grub is 
not installed in the same prefix as gettext, since the script 
util/grub.d/10_linux.in contains:

. ${bindir}/gettext.sh

A possible patch is given below, but there are surely other ways to deal 
with it.  The patch simply falls back to echo instead of gettext if the 
gettext binary cannot be found.

Thanks for your time,

Grégoire

--- util/grub.d/10_linux.in.orig	2009-12-30 15:37:01.000000000 +0100
+++ util/grub.d/10_linux.in
@@ -22,7 +22,12 @@ bindir=@bindir@
  libdir=@libdir@
  . ${libdir}/grub/grub-mkconfig_lib

-. ${bindir}/gettext.sh
+if $(which gettext >/dev/null 2>/dev/null) ; then
+  gettext="gettext"
+else
+  gettext="echo"
+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



             reply	other threads:[~2009-12-30 15:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-30 15:01 Grégoire Sutre [this message]
2010-01-01 12:03 ` Config file generation failure on Linux 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

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=4B3B6B2D.70503@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.