SHA256
1
0
forked from pool/grub2

Accepting request 135588 from devel:openSUSE:Factory

Hi,

Please help to review the patch, it fixed error message of missing *.mo.gz file if the translation of that language not available (bnc#771393). (forwarded request 135586 from michael-chang)

OBS-URL: https://build.opensuse.org/request/show/135588
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=45
This commit is contained in:
Stephan Kulow 2012-09-25 07:46:38 +00:00 committed by Git OBS Bridge
parent 2068a32a67
commit 137da0f013
3 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,39 @@
From d01cc563e1f766ecb9c255438ee49b4d31432dc0 Mon Sep 17 00:00:00 2001
From: Michael Chang <mchang@suse.com>
Date: Fri, 21 Sep 2012 15:25:56 +0800
Subject: [PATCH] Fix /grub2/locale/en.mo.gz not found error message
References: bnc#771393
Patch-Mainline: no
We don't insert gettext module if message catalog file missing to
prevent error message from being logged.
---
util/grub.d/00_header.in | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
index bb34ef2..d438d52 100644
--- a/util/grub.d/00_header.in
+++ b/util/grub.d/00_header.in
@@ -182,10 +182,14 @@ EOF
# Gettext variables and module
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)
cat << EOF
- set locale_dir=\$prefix/locale
- set lang=${grub_lang}
- insmod gettext
+ if [ -f "\$prefix/locale/${grub_lang}.mo" ] ; then
+ set locale_dir=\$prefix/locale
+ set lang=${grub_lang}
+ insmod gettext
+ fi
EOF
fi
--
1.7.3.4

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Sep 21 07:37:53 UTC 2012 - mchang@suse.com
- grub2-fix-locale-en.mo.gz-not-found-error-message.patch (bnc#771393)
-------------------------------------------------------------------
Wed Sep 19 18:54:34 UTC 2012 - arvidjaar@gmail.com

View File

@ -96,6 +96,7 @@ Patch14: grub2-stdio.in.patch
Patch15: not-display-menu-when-boot-once.patch
Patch16: grub2-fix-Grub2-with-SUSE-Xen-package-install.patch
Patch17: grub2-pass-corret-root-for-nfsroot.patch
Patch18: grub2-fix-locale-en.mo.gz-not-found-error-message.patch
Patch99: use-grub2-efi-as-a-package-name.patch
PreReq: perl-Bootloader
Requires: gettext-runtime
@ -164,6 +165,7 @@ cd grub-%{version}
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
cd ..
# README.openSUSE