[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#378659: lpstat does not work with LANG=de_DE when package cupsys is not installed



Am Dienstag, 18. Juli 2006 14:28 schrieb Kenshi Muto:
> At Tue, 18 Jul 2006 08:48:00 +0200,
>
> Wolfgang Walter wrote:
> > Package: cupsys-client
> > Version: 1.2.1-3
> >
> > If only package cupsys-client is installed but not package cupsys lpstat
> > does not work with LANG=de_DE (and probably others).
> >
> > Reason: lpstat wants to open /usr/share/cups/charmaps/iso-8859-15.txt
> > which is only installed by cupsys.
>
> It's correct that locale files should be moved in a 'common'
> package instead of cupsys. (although this makes NEW package,
> prevents entering CUPS package to unstable for a few days or weeks)
>
> But as far as my observation, lpstat "works" without cupsys.
> lpstat or any other commands seem fall back to English mode if
> cups_*.po file is missing (charmap file isn't important at
> this stage).

This seems to be the case for not existing locales (this means they are not 
in /etc/locale.gen and are not generated). If the locale exists then lpstat 
detects the charmap and tries to open the charmap.

Here is a example: with LANG=cs_CZ

*** case 1: cs_CZ not in /etc/locale.gen

.........
.........
read(6, "Default Melone\n", 32768)      = 15
read(6, "", 32768)                      = 0
close(6)                                = 0
munmap(0xb7f90000, 32768)               = 0
access("/usr/share/locale/cs_CZ/cups_cs_CZ.po", F_OK) = -1 ENOENT (No such 
file or directory)
access("/usr/share/locale/cs/cups_cs.po", F_OK) = -1 ENOENT (No such file or 
directory)
open("/usr/share/locale/C/cups_C.po", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No 
such file or directory)
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 8), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb7f97000
write(1, "system default destination: Melo"..., 35system default destination: 
Melone
) = 35
munmap(0xb7f97000, 4096)                = 0
exit_group(0)                           = ?


*** case 2: cs_CZ in /etc/locale.gen (via dpkg-reconfigure):

...........
...........
read(6, "Default Melone\n", 32768)      = 15
read(6, "", 32768)                      = 0
close(6)                                = 0
munmap(0xb7932000, 32768)               = 0
access("/usr/share/locale/cs_CZ/cups_cs_CZ.po", F_OK) = -1 ENOENT (No such 
file or directory)
access("/usr/share/locale/cs/cups_cs.po", F_OK) = -1 ENOENT (No such file or 
directory)
open("/usr/share/locale/C/cups_C.po", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No 
such file or directory)
open("/usr/share/cups/charmaps/iso-8859-2.txt", O_RDONLY|O_LARGEFILE) = -1 
ENOENT (No such file or directory)
exit_group(0)                           = ?
Process 15354 detached


You see the difference in the strace output.

Thanks,
-- 
Wolfgang Walter
Studentenwerk München
Anstalt des öffentlichen Rechts
Leiter EDV
Leopoldstraße 15
80802 München
Tel: +49 89 38196 276
Fax: +49 89 38196 144
wolfgang.walter@studentenwerk.mhn.de
http://www.studentenwerk.mhn.de/




Reply to: