You are not logged in.

#1 2019-07-21 17:43:14

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 245

[SOLVED] pacman NoExtract for a single language only

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)


-=[ LIVE enabled UEFI with redundant syslinux pure systemd detached LUKS header partitionless encrypted GPT SSDx3 RAID0 because I can.  ]=-
Backward compatibility is for the masses. There's no dual-boot here.

[KairiTech is only artificially intelligent.  Turing would be agast at just how artificial.]

Offline

#2 2019-07-21 17:58:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 21,899
Website

Re: [SOLVED] pacman NoExtract for a single language only

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.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2019-07-21 18:05:41

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 245

Re: [SOLVED] pacman NoExtract for a single language only

Trilby wrote:
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.


-=[ LIVE enabled UEFI with redundant syslinux pure systemd detached LUKS header partitionless encrypted GPT SSDx3 RAID0 because I can.  ]=-
Backward compatibility is for the masses. There's no dual-boot here.

[KairiTech is only artificially intelligent.  Turing would be agast at just how artificial.]

Offline

#4 2019-07-21 18:35:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 21,899
Website

Re: [SOLVED] pacman NoExtract for a single language only

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

#5 2019-07-21 18:38:23

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 245

Re: [SOLVED] pacman NoExtract for a single language only

Trilby wrote:

You did a fresh reinstall between the two outputs (en_?? and en_CA) in your first post?

That's correct. I did.


-=[ LIVE enabled UEFI with redundant syslinux pure systemd detached LUKS header partitionless encrypted GPT SSDx3 RAID0 because I can.  ]=-
Backward compatibility is for the masses. There's no dual-boot here.

[KairiTech is only artificially intelligent.  Turing would be agast at just how artificial.]

Offline

#6 2019-08-04 01:48:22

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 245

Re: [SOLVED] pacman NoExtract for a single language only

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/*

-=[ LIVE enabled UEFI with redundant syslinux pure systemd detached LUKS header partitionless encrypted GPT SSDx3 RAID0 because I can.  ]=-
Backward compatibility is for the masses. There's no dual-boot here.

[KairiTech is only artificially intelligent.  Turing would be agast at just how artificial.]

Offline

#7 2019-08-04 08:29:55

stepnem
Member
Registered: 2019-08-04
Posts: 3

Re: [SOLVED] pacman NoExtract for a single language only

KairiTech wrote:

So it seems that en_CA depends on both en_US and en_BG

How does one identify such a dependency?

Offline

#8 2019-08-05 17:54:19

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 245

Re: [SOLVED] pacman NoExtract for a single language only

stepnem wrote:
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.


-=[ LIVE enabled UEFI with redundant syslinux pure systemd detached LUKS header partitionless encrypted GPT SSDx3 RAID0 because I can.  ]=-
Backward compatibility is for the masses. There's no dual-boot here.

[KairiTech is only artificially intelligent.  Turing would be agast at just how artificial.]

Offline

#9 2019-08-05 19:51:03

stepnem
Member
Registered: 2019-08-04
Posts: 3

Re: [SOLVED] pacman NoExtract for a single language only

Thanks!

I wonder if there really is no better way...

Offline

#10 2019-08-05 20:48:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 21,899
Website

Re: [SOLVED] pacman NoExtract for a single language only

$ 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

#11 2019-08-05 22:55:25

stepnem
Member
Registered: 2019-08-04
Posts: 3

Re: [SOLVED] pacman NoExtract for a single language only

Great, thank you!

Offline

Board footer

Powered by FluxBB