From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1TGDab-0006nz-Sj for mharc-grub-devel@gnu.org; Mon, 24 Sep 2012 14:41:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGDaZ-0006nt-Ad for grub-devel@gnu.org; Mon, 24 Sep 2012 14:41:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGDaY-0002J6-2T for grub-devel@gnu.org; Mon, 24 Sep 2012 14:41:03 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:59193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGDaX-0002Iv-Qq for grub-devel@gnu.org; Mon, 24 Sep 2012 14:41:01 -0400 Received: by lbok6 with SMTP id k6so534866lbo.0 for ; Mon, 24 Sep 2012 11:41:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:x-mailer:mime-version:content-transfer-encoding; bh=j0u6Z6gG9HEjPjkhMhsaY/S6uo7unxvHqz10o1z3DNU=; b=yNP6qe1NILbikxSDFUsM30NPI2Ub2ep3MSyBgiGZBvVJdMalh3HT58Wsw7tXhYJvFI v5s1BEm3wNIf1kIL2olpQk4HWJw30z/uQlg7OljPjMTmvCc9krS2MVnOTgngaXWjgUjm JuHvIkyr2C7v/VMiTjJv/pUnj5nFRI4ywExltmFdSyn/Pr/FFgYcPv62UDa8FqahWEdS un3ZaC2OSlRnh2mGELXUV3mRJejrS353Tfc3wdsCPqnq/L+Lu5RhNWPMn3vQvzpf7v4E zgd8XVsUzxD4PCg4BlKBHGpdhaDGcuzhVCeCJuyXJwYTWZTjySIWnUHkl6HbqwVRehel 1IqQ== Received: by 10.112.47.133 with SMTP id d5mr4749858lbn.47.1348512060388; Mon, 24 Sep 2012 11:41:00 -0700 (PDT) Received: from [192.168.10.142] (ppp83-237-47-40.pppoe.mtu-net.ru. [83.237.47.40]) by mx.google.com with ESMTPS id d1sm4492921lbh.7.2012.09.24.11.40.58 (version=SSLv3 cipher=OTHER); Mon, 24 Sep 2012 11:40:59 -0700 (PDT) Message-ID: <1348512057.1612.10.camel@opensuse.site> Subject: Re: [PATCH] suppress error message "/grub2/locale/en.mo.gz not found" From: Andrey Borzenkov To: The development of GNU GRUB Date: Mon, 24 Sep 2012 22:40:57 +0400 In-Reply-To: <506029C8.8000804@kiilerich.com> References: <1348469509-21079-1-git-send-email-mchang@suse.com> <506029C8.8000804@kiilerich.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.217.169 Cc: Michael Chang X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Sep 2012 18:41:04 -0000 В Пн., 24/09/2012 в 11:37 +0200, Mads Kiilerich пишет: > On 09/24/2012 08:51 AM, Michael Chang wrote: > > We don't insert gettext module if message catalog file missing to > > prevent error message from being logged. > > > > Signed-off-by: Michael Chang > > --- > > 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 > > Couldn't / sholdn't this check be replaced by the new check you introduce? > > > +# We don't insert gettext module if message catalog file missing > > +# To prevent error message from being logged (bnc#771393) > > That seems like a reference to some (internal Suse?) bugtracker? To me > it is https://bugzilla.redhat.com/show_bug.cgi?id=817187 , but I guess > https://savannah.gnu.org/bugs/?35880 is the best reference. > > > 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 > > I'm +1 for the principle, but does it really work for real world locales > like de_DE which will use de.mo on runtime? > No. It does not, except for zh_CN and zh_TW. > I would guess that it also should handle all the logic in gettext.c > grub_gettext_init_ext() and grub_mofile_open_lang() and how these > functions are invoked: .gz extension, _CC stripping and > primary/secondary locale_dir. > What about removing this error message altogether? Under OS gettext does not complaint when catalog does not exist; why should it do it here? Having English interface is enough indication that message catalog was not found. -andrey