Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NsaiX-0005Cc-Jw for mharc-grub-devel@gnu.org; Fri, 19 Mar 2010 07:50:17 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NsaiV-00059E-5N for grub-devel@gnu.org; Fri, 19 Mar 2010 07:50:15 -0400 Received: from [140.186.70.92] (port=47276 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NsaiT-00057H-DF for grub-devel@gnu.org; Fri, 19 Mar 2010 07:50:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NsaiS-0005FH-2y for grub-devel@gnu.org; Fri, 19 Mar 2010 07:50:13 -0400 Received: from smarthost03.mail.zen.net.uk ([212.23.3.142]:50777) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NsaiR-0005F7-Qq for grub-devel@gnu.org; Fri, 19 Mar 2010 07:50:12 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost03.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1NsaiQ-0005As-2b for grub-devel@gnu.org; Fri, 19 Mar 2010 11:50:10 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1NsaiP-0008S0-00; Fri, 19 Mar 2010 11:50:09 +0000 Date: Fri, 19 Mar 2010 11:50:09 +0000 From: Colin Watson To: grub-devel@gnu.org Message-ID: <20100319115008.GV20777@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost03-IP: [82.69.40.219] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [PATCH] Fix locale installation X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 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: Fri, 19 Mar 2010 11:50:15 -0000 (cpina, if you're reading, I'd particularly appreciate your review.) As far as I can see, locale installation is just wrong right now. ${pkglibdir}/locale/*.mo never exists, and copying files from ${grubdir}/locale/ to ${grubdir}/locale/ is pretty odd too ... I think this patch matches reality rather better. 2010-03-19 Colin Watson * util/grub-install.in: Copy .mo files from @datadir@/locale, to match where 'make install' puts them. * util/i386/efi/grub-install.in: Likewise. === modified file 'util/grub-install.in' --- util/grub-install.in 2010-02-03 00:24:07 +0000 +++ util/grub-install.in 2010-03-19 01:04:39 +0000 @@ -32,6 +32,7 @@ platform=@platform@ host_os=@host_os@ font=@datadir@/@PACKAGE_TARNAME@/ascii.pf2 pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}` +localedir=@datadir@/locale grub_setup=${sbindir}/`echo grub-setup | sed ${transform}` if [ "${target_cpu}-${platform}" = "i386-pc" ] || [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ] || [ "${target_cpu}-${platform}" = "mips-yeeloong" ] ; then @@ -263,9 +264,9 @@ fi # Copy gettext files mkdir -p ${grubdir}/locale/ -for file in ${grubdir}/locale/*.mo ${pkglibdir}/locale/*.mo; do - if test -f "$file"; then - cp -f "$file" ${grubdir}/locale/ +for dir in ${localedir}/*; do + if test -f "$dir/LC_MESSAGES/grub.mo"; then + cp -f "$dir/LC_MESSAGES/grub.mo" "${grubdir}/locale/${dir##*/}.mo" fi done === modified file 'util/i386/efi/grub-install.in' --- util/i386/efi/grub-install.in 2010-03-04 14:12:34 +0000 +++ util/i386/efi/grub-install.in 2010-03-19 01:04:36 +0000 @@ -31,6 +31,7 @@ target_cpu=@target_cpu@ platform=@platform@ host_os=@host_os@ pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}` +localedir=@datadir@/locale grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}` grub_mkdevicemap=${sbindir}/`echo grub-mkdevicemap | sed ${transform}` @@ -182,9 +183,9 @@ done # Copy gettext files mkdir -p ${grubdir}/locale/ -for file in ${grubdir}/locale/*.mo ${pkglibdir}/locale/*.mo; do - if test -f "$file"; then - cp -f "$file" ${grubdir}/locale/ +for dir in ${localedir}/*; do + if test -f "$dir/LC_MESSAGES/grub.mo"; then + cp -f "$dir/LC_MESSAGES/grub.mo" "${grubdir}/locale/${dir##*/}.mo" fi done Thanks, -- Colin Watson [cjwatson@ubuntu.com]