Bug 143035 - s-c-p didnt start with non-english locales
Summary: s-c-p didnt start with non-english locales
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-printer   
(Show other bugs)
Version: 3
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 165954 170286
TreeView+ depends on / blocked
 
Reported: 2004-12-15 21:23 UTC by Grigory Bakunov
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: 0.6.120-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-17 18:01:54 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
simple patch to fix this problems (4.14 KB, patch)
2004-12-15 21:35 UTC, Grigory Bakunov
no flags Details | Diff

Description Grigory Bakunov 2004-12-15 21:23:38 UTC
Description of problem:
System-config-printer (nor tui nor gui version) didn't start with
non-us locale (ru_RU.UTF-8 in my case). It's throw python exceptions
information finished with
----
  File "/usr/share/printconf/util/cups_import.py", line 200, in
import_needed
    which = which_spooler ()
  File "/usr/share/printconf/util/cups_import.py", line 195, in
which_spooler
    return which
UnboundLocalError: local variable 'which' referenced before assignment
----
Steps to Reproduce:
1. set locale as mine:

LANG=en_US.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=ru_RU.UTF-8

2. run system-config-printer on clean install
3. have a fun :)

Comment 1 Grigory Bakunov 2004-12-15 21:35:50 UTC
Created attachment 108654 [details]
simple patch to fix this problems

I simply add LC_ALL=C to all os.system calls.

Comment 2 Tim Waugh 2004-12-16 00:05:56 UTC
Please confirm the version you are using.

The LANG variable overrides all LC_xxx variables, and so as far as I
can see your patch has no effect.

'test3' is for a test release of Fedora Core.  Do you mean to report a
bug against Fedora Core 3?  If so please correct the "version" field.


Comment 3 Grigory Bakunov 2004-12-16 09:45:29 UTC
yes, LANG variable override all LC_xxx variables except of LC_ALL.
But if LC_ALL set to some value (like in my case) then redefinition of
LANG do nothing. You can look at glibc sources for check this.
For example:
> LC_ALL=C LANG=C cal
    December 2004
Su Mo Tu We Th Fr Sa 
          1  2  3  4
 5  6  7  8  9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

> LC_ALL=ru_RU.UTF-8 LANG=C cal
    ÐекабÑÑ 2004
ÐÑ Ðн ÐÑ Ð¡Ñ Ð§Ñ ÐÑ Ð¡Ð± 
          1  2  3  4
 5  6  7  8  9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31


Comment 4 Tim Waugh 2004-12-20 15:12:55 UTC
Ah, thanks.  I'd got it the wrong way round.  LC_ALL overrides LANG as you say.
Fixed in CVS.


Note You need to log in before you can comment on or make changes to this bug.