SHA256
1
0
forked from pool/grub2

Accepting request 137371 from devel:openSUSE:Factory

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/137371
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=46
This commit is contained in:
Stephan Kulow 2012-10-07 17:00:03 +00:00 committed by Git OBS Bridge
parent 137da0f013
commit d0c09ba3d4
2 changed files with 33 additions and 27 deletions

View File

@ -1,38 +1,37 @@
From d01cc563e1f766ecb9c255438ee49b4d31432dc0 Mon Sep 17 00:00:00 2001 From e7500166b343874447e6abf385a791998c77f4c4 Mon Sep 17 00:00:00 2001
From: Michael Chang <mchang@suse.com> From: Michael Chang <mchang@suse.com>
Date: Fri, 21 Sep 2012 15:25:56 +0800 Date: Wed, 26 Sep 2012 15:55:44 +0800
Subject: [PATCH] Fix /grub2/locale/en.mo.gz not found error message Subject: [PATCH] Silence error messages when translations are unavailable
From: Colin Watson <cjwatson@ubuntu.com>
References: bnc#771393 References: bnc#771393
https://savannah.gnu.org/bugs/?35880
Patch-Mainline: no Patch-Mainline: no
We don't insert gettext module if message catalog file missing to Signed-off-by: Michael Chang <mchang@suse.com>
prevent error message from being logged.
--- ---
util/grub.d/00_header.in | 10 +++++++--- grub-core/gettext/gettext.c | 8 ++++++++
1 files changed, 7 insertions(+), 3 deletions(-) 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
index bb34ef2..d438d52 100644 index 569f985..eb4bb5d 100644
--- a/util/grub.d/00_header.in --- a/grub-core/gettext/gettext.c
+++ b/util/grub.d/00_header.in +++ b/grub-core/gettext/gettext.c
@@ -182,10 +182,14 @@ EOF @@ -412,6 +412,14 @@ grub_gettext_init_ext (struct grub_gettext_context *ctx,
# Gettext variables and module grub_free (lang);
if [ "x${LANG}" != "xC" ] ; then }
+# We don't insert gettext module if message catalog file missing +
+# To prevent error message from being logged (bnc#771393) + /* If no translations are available, fall back to untranslated text. */
cat << EOF + if (err == GRUB_ERR_FILE_NOT_FOUND)
- set locale_dir=\$prefix/locale + {
- set lang=${grub_lang} + grub_errno = GRUB_ERR_NONE;
- insmod gettext + return 0;
+ if [ -f "\$prefix/locale/${grub_lang}.mo" ] ; then + }
+ set locale_dir=\$prefix/locale +
+ set lang=${grub_lang} return err;
+ insmod gettext }
+ fi
EOF
fi
-- --
1.7.3.4 1.7.3.4

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Sep 26 08:04:48 UTC 2012 - mchang@suse.com
- refresh grub2-fix-locale-en.mo.gz-not-found-error-message.patch
with the correct fix in upstream bugzilla #35880 by Colin Watson
(bnc#771393)
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Sep 21 07:37:53 UTC 2012 - mchang@suse.com Fri Sep 21 07:37:53 UTC 2012 - mchang@suse.com