langpack installation/removal should rebuild gnome menu cache

Bug #545951 reported by Valentijn Sessink
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
langpack-locales (Ubuntu)
Fix Released
High
Martin Pitt
Lucid
Fix Released
High
Martin Pitt

Bug Description

Binary package hint: gnome-menus

After a network install of Lucid (preseeded, from an up-to-date mirror 2010-03-24), the /usr/share/applications/desktop.nl_NL.utf8.cache file contains English descriptions all over the place. This is probably the result of update-gnome-menus-cache having a different idea of the Locale than the process that calculates the name of the output file.

Installing and/or deinstalling a package after the installation will correct the issue - again, this is probably the result of update-gnome-menus-cache and the output file now agreeing on the locale.

Changed in gnome-menus (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

Do you have the Dutch language packs installed? What is the output of

 dpkg -l language-pack | grep ^ii

?

Changed in gnome-menus (Ubuntu):
status: New → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

Oh, I guess the issue might be that at the time when the first cache was generated, the language packs were not installed yet.

Thus installing a language pack should regenerate the cache.

affects: gnome-menus (Ubuntu) → langpack-locales (Ubuntu)
Changed in langpack-locales (Ubuntu):
importance: Undecided → High
status: Incomplete → In Progress
summary: - discrepancy in locale during network install: desktop.$locale.cache goes
- wrong
+ langpack installation/removal should rebuild gnome menu cache
Changed in langpack-locales (Ubuntu Lucid):
milestone: none → ubuntu-10.04-beta-2
Revision history for this message
Valentijn Sessink (valentijn) wrote :
Download full text (3.2 KiB)

I'm not so sure. Here's a system that, during install time, has the language-pack-nl installed; but the cache is still wrong.

I'd still put my guesses on a difference in locale, update-gnome-menus-cache getting the locale wrong during install time.

And it gets weirder. We now install Acroread in the postinstall script and now:

Mar 25 11:22:36 in-target: Uitpakken van language-pack-nl (uit .../language-pack-nl_1%3a10.04+20100320_all.deb) ...
Mar 25 11:22:36 in-target: Overschrijven van de bestanden in het oude pakket language-pack-nl-base ...
Mar 25 11:22:37 in-target: Instellen van language-pack-nl (1:10.04+20100320) ...
Mar 25 11:22:37 in-target: Instellen van language-pack-nl-base (1:10.04+20100313) ...
(so here's language-pack installed)
[...]
Mar 25 11:32:38 in-target: Selecteren van voorheen niet geselecteerd pakket latex-xft-fonts.
Mar 25 11:32:38 in-target: Uitpakken van latex-xft-fonts (uit .../latex-xft-fonts_0.1-8_all.deb) ...
Mar 25 11:32:38 in-target: Selecteren van voorheen niet geselecteerd pakket libhx22.
Mar 25 11:32:38 in-target: Uitpakken van libhx22 (uit .../libhx22_3.2-1_amd64.deb) ...
Mar 25 11:32:38 in-target: Selecteren van voorheen niet geselecteerd pakket libpam-mount.
Mar 25 11:32:38 in-target: Uitpakken van libpam-mount (uit .../libpam-mount_1.32-2_amd64.deb) ...
Mar 25 11:32:39 in-target: Selecteren van voorheen niet geselecteerd pakket molly-guard.
Mar 25 11:32:39 in-target: Uitpakken van molly-guard (uit .../molly-guard_0.4.4-2_all.deb) ...
Mar 25 11:32:39 in-target: Processing triggers for man-db ...
Mar 25 11:32:41 in-target: Processing triggers for ureadahead ...
Mar 25 11:32:41 in-target: Processing triggers for hicolor-icon-theme ...
Mar 25 11:32:42 in-target: Processing triggers for desktop-file-utils ...
Mar 25 11:32:42 in-target: Processing triggers for python-gmenu ...
Mar 25 11:32:42 in-target: Rebuilding /usr/share/applications/desktop.nl_NL.utf8.cache...
(this is the last time desktop.nl_NL.utf8.cache is rebuilt; it contains wrong information here)

By the way, Perl keeps complaining:
Mar 25 11:34:30 log-output: perl: warning: Setting locale failed.
Mar 25 11:34:30 log-output: perl: warning: Please check that your locale settings:
Mar 25 11:34:30 log-output: LANGUAGE = (unset),
Mar 25 11:34:30 log-output: LC_ALL = (unset),
Mar 25 11:34:30 log-output: LANG = "C.UTF-8"
Mar 25 11:34:30 log-output: are supported and installed on your system.
Mar 25 11:34:30 log-output: perl: warning: Falling back to the standard locale ("C").
Mar 25 11:34:31 log-output: locale: Cannot set LC_CTYPE to default locale: No such file or directory
Mar 25 11:34:31 log-output: locale: Cannot set LC_MESSAGES to default locale: No such file or directory
Mar 25 11:34:31 log-output: locale:
Mar 25 11:34:31 log-output: Cannot set LC_ALL to default locale
Mar 25 11:34:31 log-output: : No such file or directory

(And please note I'm *not* suggesting that Perl and Python are the same thing ;-)

Now we do the postinstall preseed-stuff and see:
Mar 25 11:34:36 log-output: locale:
Mar 25 11:34:36 log-output: Cannot set LC_ALL to default locale
Mar 25 11:34:36 log-output: : No such file or directory
Mar 25 11:34:36 log-o...

Read more...

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 545951] Re: langpack installation/removal should rebuild gnome menu cache

Hello Valentijn,

Valentijn Sessink [2010-03-25 11:54 -0000]:
> Mar 25 11:22:36 in-target: Uitpakken van language-pack-nl (uit .../language-pack-nl_1%3a10.04+20100320_all.deb) ...
> Mar 25 11:22:36 in-target: Overschrijven van de bestanden in het oude pakket language-pack-nl-base ...
> Mar 25 11:22:37 in-target: Instellen van language-pack-nl (1:10.04+20100320) ...
> Mar 25 11:22:37 in-target: Instellen van language-pack-nl-base (1:10.04+20100313) ...
> (so here's language-pack installed)

Please note that you need to look for language-pack-gnome-nl and
-base, since it's those packages which have the .desktop translations
for GNOME packages.

> Mar 25 11:32:42 in-target: Rebuilding /usr/share/applications/desktop.nl_NL.utf8.cache...
> (this is the last time desktop.nl_NL.utf8.cache is rebuilt; it contains wrong information here)
>
> By the way, Perl keeps complaining:
> Mar 25 11:34:30 log-output: perl: warning: Setting locale failed.
> Mar 25 11:34:30 log-output: perl: warning: Please check that your locale settings:
> Mar 25 11:34:30 log-output: LANGUAGE = (unset),
> Mar 25 11:34:30 log-output: LC_ALL = (unset),
> Mar 25 11:34:30 log-output: LANG = "C.UTF-8"

This is really strange. Why is $LANG suddenly set to C.UTF-8? Do you
have the full install log still, and could you attach it? I wonder at
which point the locale package gets installed and configured (i. e. at
which point you actually have working locales).

> Now we do the postinstall preseed-stuff and see:
> Mar 25 11:34:36 log-output: locale:
> Mar 25 11:34:36 log-output: Cannot set LC_ALL to default locale
> Mar 25 11:34:36 log-output: : No such file or directory
> Mar 25 11:34:36 log-output:
> Mar 25 11:34:36 log-output: Rebuilding /usr/share/applications/desktop.C.utf8.cache...
>
> Huh?

It seems that somewhere in between the locale ($LANG) gets changed or
dropped. I have no real idea why, it doesn't happen on a normal
install from CD.

A full install log might help.

Thanks,

Martin

--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
Valentijn Sessink (valentijn) wrote :

You're right about the language-pack-gnome-nl, it's installed after the last update of the cache:
Mar 25 11:33:53 in-target: Instellen van language-pack-gnome-nl (1:10.04+20100320) ...
Mar 25 11:33:53 in-target: Instellen van language-pack-gnome-nl-base (1:10.04+20100313) ...
Complete install log is attached.

Revision history for this message
Valentijn Sessink (valentijn) wrote :

BTW an install from CD has the LANG set from the beginning; so there the chances of changing it wrong are less than a preseeded install, where only those things are set that are set explicitly in the installer.

Also, while I'm writing this, I realise that the last remarks (language set to "C") might be the result of a rather rough "chroot" to the target file system to finish installation. Maybe we should source /etc/default/locale. Anyway, please disregard the desktop.C.utf8 stuff, it's probably due to our rather eccentric post-installation stuff, combined with the fact that the preseed environment does not have a locale.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks for the log. This confirms my suspicion in comment 2. I'll get that fixed ASAP.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package langpack-locales - 2.11+git20100304-2

---------------
langpack-locales (2.11+git20100304-2) lucid; urgency=low

  * debian/local/{install,remove}-language-pack: Trigger gmenucache, to ensure
    that the gnome-menus .desktop file cache is updated after changing
    language packs. (LP: #545951)
 -- Martin Pitt <email address hidden> Thu, 25 Mar 2010 15:45:47 +0100

Changed in langpack-locales (Ubuntu Lucid):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.