View previous topic :: View next topic |
Author |
Message |
LegionOfHell Apprentice
Joined: 16 Mar 2019 Posts: 253 Location: Toronto, Canada
|
Posted: Sat Aug 22, 2020 9:09 pm Post subject: glibc Installed a lot of Locales. |
|
|
During the installation of Gentoo I un-commented en_US.UTF-8 UTF-8 in /etc/locale.gen and there were like two entries in there..
Along the way, I mistakenly emerged glibc : emerge glibc
now glibc is in /var/lib/portage/world file and when I try to update/upgrade my system I see these texts during compilation/installation of glibc: https://ibb.co/4Fr8vg5
and my /etc/locale.gen reads: https://pastebin.com/bL3n3BRd
Is this normal or should I do something about it ? is it reversible ?
i used this command to update my system:
emerge-webrsync
emerge --update --deep --with-bdeps=y --newuse @world |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sat Aug 22, 2020 9:16 pm Post subject: |
|
|
LegionOfHell,
/etc/locale.gen is now only comments, so glibc built all the locales.
emerge --deselect ...
will remove a package from world but not from your system. Removing glibc from your system is a verybadthing.
Edit your /etc/locale.gen to your taste then run
Only the locales in /etc/locale.gen will be built.
In future, glibc will only build the selected locales. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
LegionOfHell Apprentice
Joined: 16 Mar 2019 Posts: 253 Location: Toronto, Canada
|
Posted: Sat Aug 22, 2020 9:30 pm Post subject: |
|
|
Quote: | /etc/locale.gen is now only comments, so glibc built all the locales. |
You mean portage modified /etc/locale.gen to have only commented entries and also commented my en_US.UTF-8 UTF-8 line without me knowing it and then when glibc was emerged it built all the locales ?
Am I getting it right ?
Quote: | Edit your /etc/locale.gen to your taste then run
Code:
locale-gen
Only the locales in /etc/locale.gen will be built.
In future, glibc will only build the selected locales. |
So If glibc gets re-emerged in the next update , all the extra locales it built will be removed ? Is that all the untidiness glibc made ? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sat Aug 22, 2020 9:37 pm Post subject: |
|
|
LegionOfHell,
Nope. Portage does not do that. I suspect you got an update to /etc/locale.gen in etc-update and accepted it.
Its a CONFIG_PROTECT file.
You do not need to re-emerge glibc.
builds just the locales, just as glibc does but only builds the locales.
You wasted some CPU time and installed some bloat, that's all. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
LegionOfHell Apprentice
Joined: 16 Mar 2019 Posts: 253 Location: Toronto, Canada
|
Posted: Sat Aug 22, 2020 9:46 pm Post subject: |
|
|
I have
Code: | CONFIG_PROTECT="-*" |
because i wanted all the config files related to the packages I am removing to go along with the packages...is this a good idea ? should I remove this line ?
Quote: | You wasted some CPU time and installed some bloat, that's all.
|
Can you tell me how to get rid of the bloat ? I want to remove ALL of the bloat created by setting CONFIG_PROTECT="-*" and adding glibc [/b]to the world.
Many Thanks |
|
Back to top |
|
|
LegionOfHell Apprentice
Joined: 16 Mar 2019 Posts: 253 Location: Toronto, Canada
|
Posted: Sat Aug 22, 2020 10:05 pm Post subject: |
|
|
I set CONFIG_PROTECT="-*" like a month ago, This explains why my /etc/locale.gen is modified. so yeah it was modified to have all locales commented out...which caused glibc to generate all the locales...Is there a way to delete all the bloats created by this ? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sun Aug 23, 2020 8:41 am Post subject: |
|
|
LegionOfHell,
CONFIG_PROTECT="-*" prevents portage warning about updates to configuration files in the protected locations. It just does them.
Yes, its a very bad thing. Portage will reset things like /etc/fstab, then your system won't boot.
Edit /etc/locale.gen
Run Code: | locale-gen
emerge --deselect sys-libs/glibc |
To fix glibc.
We don't know what else was reset. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
LegionOfHell Apprentice
Joined: 16 Mar 2019 Posts: 253 Location: Toronto, Canada
|
Posted: Sun Aug 23, 2020 1:02 pm Post subject: |
|
|
Quote: | We don't know what else was reset.
|
probably nothing...everything is working....is there a way to find out ? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sun Aug 23, 2020 1:10 pm Post subject: |
|
|
LegionOfHell,
You can look back through /var/log/emerge.log and for every package since you changed CONFIG_PROTECT then run Code: | equery f <category/package> |
That will give you a list of files that have been installed while CONFIG_PROTECT was off.
Its only files that you have manually changed that matter, like /etc/fstab, /etc/locales, all the things in /etc/conf.d/ and a few other places.
Only you know what you have changed. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
LegionOfHell Apprentice
Joined: 16 Mar 2019 Posts: 253 Location: Toronto, Canada
|
Posted: Sun Aug 23, 2020 8:56 pm Post subject: |
|
|
I could just skip going through /var/log/emerge.log and check each package for the files they installed...
As you say, only the files that I have modified matters..so i can check only them ...
Many Thanks |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sun Aug 23, 2020 9:31 pm Post subject: |
|
|
LegionOfHell,
/var/log/emerge.log is a chronological list of emerge operations since your system was first installed. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Sun Aug 23, 2020 10:22 pm Post subject: |
|
|
I am not actually very clear about which locales I need...
Are locales only about the UI language..?
Is English just enough?
Or do i need more for browsers etc?
Are locales related to fonts?
For example lets say in libreoffice I neet to type I dont know lets say French Do i need the French locale also?
Or this is a font thing only?
Please kindly clarify this a bit my knowledgeable peers...
Thanks a lot.. |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Sun Aug 23, 2020 11:10 pm Post subject: |
|
|
So many questions!
The locales 'C', 'POSIX' and 'en_US.utf8' are strictly necessary.
You'll also need the locales you define with 'localectl' or in '/etc/env.d02locale' - if you use anything else than 'C', 'POSIX' or 'en_US.utf8'.
Think about the users of your machine. Which date format do they want to get displayed when they run 'date' or 'ls -la'? Add the required locales.
You maintain a server for students at an international university? Install all locales - because you don't know which locales the students will use
Browsers and LibreOffice use their own locale mechanism. You don't need to add the locale "fr_FR.utf8" if you want the French spell checker in LibreOffice.
Locales are not related to fonts. But if you want to get Chinese characters if you run 'LANG=zh_CN.utf8 date', you'll need a font that supports Chinese characters, of course.
Code: | LANG="C" date -> Mon Aug 24 01:15:22 CEST 2020
LANG="en_US.utf8" date -> Mon Aug 24 01:15:22 AM CEST 2020
LANG="de_DE.utf8" date -> Mo 24. Aug 01:15:22 CEST 2020
LANG="zh_CN.utf8 date" -> 2020年 08月 24日 星期一 01:15:24 CEST # font with Chinese characters necessary |
Last edited by mike155 on Sun Aug 23, 2020 11:29 pm; edited 3 times in total |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Sun Aug 23, 2020 11:21 pm Post subject: |
|
|
Thanks mike155,
I understand now that i did NOT know what locales are....
It seems I never had an interest to know more......
I dismissed the whole "locale" as something uninteresting and dull.
My mistake.......
|
|
Back to top |
|
|
LegionOfHell Apprentice
Joined: 16 Mar 2019 Posts: 253 Location: Toronto, Canada
|
Posted: Wed Aug 26, 2020 12:09 am Post subject: |
|
|
NeddySeagoon wrote: | LegionOfHell,
You can look back through /var/log/emerge.log and for every package since you changed CONFIG_PROTECT then run Code: | equery f <category/package> |
That will give you a list of files that have been installed while CONFIG_PROTECT was off.
Its only files that you have manually changed that matter, like /etc/fstab, /etc/locales, all the things in /etc/conf.d/ and a few other places.
Only you know what you have changed. |
(1) After running equery f pkg , Should I look at config files that are in /etc/* only right ? equery f pkg | grep /etc/ should be enough...?
(2) I have not changed/modified the following files since my installation(just did as the installation handbook instructed), hopefully these two files don't count:
Code: | /etc/portage/repos.conf/gentoo.conf
/etc/resolv.conf |
(3) I think I shouldn't worry about /etc/init.d/services either since I only started them and did not touch them, also all of the rc-* commands I have run shouldn't affect any configs:
Code: | /etc/init.d/dhcpcd start
/etc/init.d/wpa_supplicant start
/etc/init.d/fcron start
all of the rc-* commands
.
.
etc |
Please confirm, many Thanks |
|
Back to top |
|
|
Doplerr n00b
Joined: 26 Aug 2020 Posts: 1
|
Posted: Wed Aug 26, 2020 9:48 am Post subject: |
|
|
That will give you a rundown of records that have been introduced while CONFIG_PROTECT was off.
Its solitary records that you have physically changed that issue, as/and so on/fstab,/and so forth/areas, all the things in/and so on/conf.d/and a couple of different spots.
Just you realize what you have changed. |
|
Back to top |
|
|
|