You are not logged in.
Pages: 1
... can cause problems because they all change the currently configured locale, regardless whether or not this is the locale that has been removed. I've just checked some packages and it looks like they all have this in their receipts ...
[c]
# Back to C if it's the last used locale.
post_remove()
{
echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
}
[/c]
Offline
I think post_remove() in the receipt of the locale packages should look like this ...
[c]
# Back to C if this is the currently used locale.
post_remove()
{
if grep -Fq "xx_" /etc/locale.conf; then
echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
fi
}
[/c]
... where "xx_" stands for the language part of the locale string, e.g. "de_", "es_", "fr_", "pt_", "ru_" etc.
Any opinions?
Offline
Thanks Pascal ... and your solution is much more elegant :-)
Offline
There's still something wrong with this. Although locales are properly removed and the currently used locale is no longer changed by the removal (unless it is the one that has been removed), the post_remove() function now gives an error message ...
[c]
The following packages have been modified by package "locale-de":
dialog
kbd-base
locale-en
Removing package "locale-de"
================================================================================
Removing all files installed... [ Done ]
Execute post-remove commands... [ Failed ]
Removing package receipt... [ Done ]
================================================================================
Package "locale-de" (5.0) removed.
The following packages have been modified by package "locale-es":
kbd-base
locale-en
Removing package "locale-es"
================================================================================
Removing all files installed... [ Done ]
Execute post-remove commands... [ Failed ]
Removing package receipt... [ Done ]
================================================================================
Package "locale-es" (5.0) removed.
The following packages have been modified by package "locale-it":
dialog
kbd-base
locale-en
Removing package "locale-it"
================================================================================
Removing all files installed... [ Done ]
Execute post-remove commands... [ Failed ]
Removing package receipt... [ Done ]
================================================================================
Package "locale-it" (5.0) removed.
The following packages have been modified by package "locale-ru":
dialog
kbd-base
locale-en
locale-pt_BR
Removing package "locale-ru"
================================================================================
Removing all files installed... [ Done ]
Execute post-remove commands... [ Failed ]
Removing package receipt... [ Done ]
================================================================================
Package "locale-ru" (5.0) removed.
The following packages have been modified by package "locale-pt_BR":
dialog
kbd-base
locale-en
Removing package "locale-pt_BR"
================================================================================
Removing all files installed... [ Done ]
Execute post-remove commands... [ Failed ]
Removing package receipt... [ Done ]
================================================================================
Package "locale-pt_BR" (5.0) removed.
[/c]
Offline
Pages: 1
[ Generated in 0.018 seconds, 7 queries executed - Memory usage: 1.54 MiB (Peak: 1.77 MiB) ]