qmail-scanner-reconfigure fails with non-English locale

Forum for getting help with Project Gamera, Spamassassin, Clamav, qmail-scanner and other anti-spam tools.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

qmail-scanner-reconfigure fails with non-English locale

Unread post by breun »

I recently ran into a problem where qmail-scanner-reconfigure would never finish. I found that the problem was that qmail-scanner's configure script would try to display a prompt telling the user that it didn't have a translation for the current locale and wait for the user to "[Hit <RETURN> to continue]". See lines 66-78 in /usr/share/qmail-scanner/configure. This prompt is shown even when configure is called with the --batch flag, because this check comes before the flags are read.

I first reported this as a bug upstream and the author said:
It's always assumed people manually figured out how they want to run "configure" and then simply use "--batch" to automate it. I actually think I need to change the script so that it EXITS if you tell it to use a locale that it doesn't support. In other parts of the configure script, any error results in an exit - not some fall-back on a different option, so that is actually inconsistent as it is
And later:
I'm going to change configure so it errors and exits if you choose an unsupported locale - more consistent with other actions. Any package installer should check the locale they are thinking of using matches one within the ./locale subdirectory, and disable the "--lang" option if there is no match. That would be safest
I think it's best if qmail-scanner-reconfigure would set the locale to en_GB (the default used when the configure script doesn't have a translation for the locale) for the call to qmail-scanner's configure?
Lemonbit Internet Dedicated Server Management
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: qmail-scanner-reconfigure fails with non-English locale

Unread post by breun »

Workaround:

Code: Select all

# LANG=C qmail-scanner-reconfigure
Lemonbit Internet Dedicated Server Management
Post Reply