Page 1 of 1

qmail-scanner-reconfigure fails with non-English locale

Posted: Tue Aug 23, 2011 9:06 am
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?

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

Posted: Fri Sep 23, 2011 9:01 am
by breun
Workaround:

Code: Select all

# LANG=C qmail-scanner-reconfigure