tags 602176 + patch
thanks

Hi!

This bug hits in the fairly common situation where an admin is connecting to 
an remote box, the ssh connection propagates the user's locale settings and so 
the remote machine is now being expected operate with locales that aren't 
installed. Normally, you would just get a lot of noise from tools like perl or 
debconf about the lack of locale definition; apt-listchanges, however, crashes 
if it can't set the locale according to LC_ALL. 

With apt-listchanges now Priority: standard and part of the normal Debian 
installation, this is becoming an increasing issue in #debian. Since apt-
listchanges only shows NEWS items by default, the first time many people will 
end up really using apt-listchanges is for their upgrade to wheezy. For that 
reason, would it be worth asking the SRMs for a stable-update to fix this in 
squeeze too?

The crash is because apt-listchanges tries to use the gettext shortcut _() 
before that function is defined. The simplest looking solution is the one that 
this patch implements -- just to stop using _() on the error message that is 
telling the user that _() can't be used... There may be a more correct 
gettext-compatible ways of doing this, but I don't know them.

cheers
Stuart

-- 
Stuart Prescott    --    www.nanonanonano.net
diff --git a/apt-listchanges/ALChacks.py b/apt-listchanges/ALChacks.py
index f83e64f..b2493a6 100644
--- a/apt-listchanges/ALChacks.py
+++ b/apt-listchanges/ALChacks.py
@@ -29,7 +29,7 @@ import sys
 try:
     locale.setlocale(locale.LC_ALL, '')
 except locale.Error:
-    sys.stderr.write(_("Can't set locale; make sure $LC_* and $LANG are correct!\n"))
+    sys.stderr.write("Can't set locale; make sure $LC_* and $LANG are correct!\n")
     locale.setlocale(locale.LC_ALL, 'C')
 
 def _(x):

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to