You are not logged in.
Synopsis: I created my own NoExtract rules to remove the locales I did not want installed. See them lower down in this post.
This is the only line my locale.gen:
en_CA.UTF-8 UTF-8
When I use this NoExtract from the pacman/Tips and tricks Wiki 2.13 Installing only content in required languages,
NoExtract = usr/share/locale/* usr/share/X11/locale/* usr/share/i18n/* opt/google/chrome/locales/*
NoExtract = !*locale*/en*/* !usr/share/i18n/charmaps/UTF-8.gz !usr/share/*locale*/locale.*
NoExtract = !usr/share/*locales/en_?? !usr/share/*locales/i18n !usr/share/*locales/iso*
NoExtract = !usr/share/*locales/trans*
This is what is left in my locale directory:
drwxr-xr-x 3 root root 4096 Jul 21 12:24 en
drwxr-xr-x 3 root root 4096 Jul 21 12:22 en@boldquot
drwxr-xr-x 3 root root 4096 Jul 21 12:22 en@quot
drwxr-xr-x 3 root root 4096 Jul 21 12:22 en@shaw
drwxr-xr-x 3 root root 4096 Jul 21 12:24 en_AU
drwxr-xr-x 3 root root 4096 Jul 21 12:22 en_CA
drwxr-xr-x 3 root root 4096 Jul 21 12:22 en_GB
drwxr-xr-x 3 root root 4096 Jul 21 12:24 en_NZ
drwxr-xr-x 3 root root 4096 Jul 21 12:22 en_US
-rw-r--r-- 1 root root 2997 Jun 23 04:33 locale.alias
From withing the installation chroot locale-gen throws this error:
Generating locales...
en_CA.UTF-8...failed to set locale!
[error] cannot open locale definition file `i18n_ctype': No such file or directory
When I change '??' to 'CA' like so:
NoExtract = !usr/share/*locales/en_CA !usr/share/*locales/i18n !usr/share/*locales/iso*
This is what is left in my locale directory:
drwxr-xr-x 3 root root 4096 Jul 21 13:07 en
drwxr-xr-x 3 root root 4096 Jul 21 13:05 en@boldquot
drwxr-xr-x 3 root root 4096 Jul 21 13:05 en@quot
drwxr-xr-x 3 root root 4096 Jul 21 13:05 en@shaw
drwxr-xr-x 3 root root 4096 Jul 21 13:07 en_AU
drwxr-xr-x 3 root root 4096 Jul 21 13:05 en_CA
drwxr-xr-x 3 root root 4096 Jul 21 13:05 en_GB
drwxr-xr-x 3 root root 4096 Jul 21 13:07 en_NZ
drwxr-xr-x 3 root root 4096 Jul 21 13:05 en_US
-rw-r--r-- 1 root root 2997 Jun 23 04:33 locale.alias
local-gen then throws this error:
Generating locales...
en_CA.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
Anybody know why the two errors and why en_AU, en_GB, en_NZ and en_US are still in /usr/share/locale?
Last edited by KairiTech (2019-08-04 01:52:27)
Offline
Anybody know why the two errors and why en_AU, en_GB, en_NZ and en_US are still in /usr/share/locale?
I can't help with the first question, but for the second, I gather you just haven't removed them. The "NoExtract" directive does what it sounds like: it will not extract matching content from new updates. It will not retroactively remove anything that is already in place. You need to remove en_AU, en_GB, etc once.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
KairiTech wrote:Anybody know why the two errors and why en_AU, en_GB, en_NZ and en_US are still in /usr/share/locale?
I can't help with the first question, but for the second, I gather you just haven't removed them. The "NoExtract" directive does what it sounds like: it will not extract matching content from new updates. It will not retroactively remove anything that is already in place. You need to remove en_AU, en_GB, etc once.
I'm not running an update from an existing install. This happens during a brand new clean first-time install.
Offline
You did a fresh reinstall between the two outputs (en_?? and en_CA) in your first post?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
You did a fresh reinstall between the two outputs (en_?? and en_CA) in your first post?
That's correct. I did.
Offline
So it seems that en_CA depends on both en_US and en_BG so I create the NoExtract rules below and no longer get any errors from locale, have no unwanted locales and I haven't had any of the apps break yet.
NoExtract = usr/share/locale/*
NoExtract = !usr/share/locale/locale.alias
NoExtract = usr/share/i18n/*
NoExtract = !usr/share/i18n/charmaps/UTF-8.gz
NoExtract = !usr/share/i18n/locales/en_CA
NoExtract = !usr/share/i18n/locales/en_GB
NoExtract = !usr/share/i18n/locales/en_US
NoExtract = !usr/share/i18n/locales/i18n
NoExtract = !usr/share/i18n/locales/i18n_ctype
NoExtract = !usr/share/i18n/locales/iso14651_*
NoExtract = !usr/share/i18n/locales/translit_*
NoExtract = usr/share/kbd/locale/*
NoExtract = usr/share/X11/locale/*
Offline
So it seems that en_CA depends on both en_US and en_BG
How does one identify such a dependency?
Offline
KairiTech wrote:So it seems that en_CA depends on both en_US and en_BG
How does one identify such a dependency?
Trial and error. When I only extracted en_CA the error was en_GB could not be found. When I also extracted en_GB the error was en_US could not be found.
Same for all the other files I eventually had to extract too.
Offline
Thanks!
I wonder if there really is no better way...
Offline
$ grep ^copy /usr/share/i18n/locales/en_CA
copy "iso14651_t1"
copy "en_GB"
copy "en_US"
copy "i18n"
FWIW, I just keep all the en*
NoExtract = usr/share/locale/* !usr/share/locale/en* !usr/share/locale/locale.alias usr/share/man/* !usr/share/man/man*
Last edited by Trilby (2019-08-05 21:00:33)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Great, thank you!
Offline