View previous topic :: View next topic |
Author |
Message |
rudregues Apprentice
Joined: 29 Jan 2013 Posts: 231 Location: Brazil
|
Posted: Thu Nov 07, 2013 10:17 pm Post subject: A safe orphan config files automatic remover? |
|
|
I was searching how to remove my orphan config files and noted even on Gentoo there's no such an automatic tool for this. Is there any reason developers didn't tried to create this or failed due to technical difficulties? Or even there's no need for this?
I think it could be a program that reads a database with every config file created when a package is installed and when more than one package uses the same config file, the database will list too. _________________ Emerging en gentoo |
|
Back to top |
|
|
Roman_Gruber Advocate
Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Fri Nov 08, 2013 11:52 am Post subject: |
|
|
I think you can never know the dependencies and the risk involved. Considering config files are not that big no one really see a big benefit except a clean directory.
There are lint file removers who check for duplicates.
I personally suggest you do it manually as you never know what you break when you remove config files. E.G. Risk of an Unbootable System and other hassles.
I also realized the --depclean option of portage is very dangerous as it breaks packages later. E.G. Openoffice needs lots of tomcat-servlet-api and other java dependencies which are not in the ebuild. |
|
Back to top |
|
|
Maitreya Guru
Joined: 11 Jan 2006 Posts: 441
|
Posted: Fri Nov 08, 2013 12:45 pm Post subject: |
|
|
You could manage your /etc in GIT |
|
Back to top |
|
|
rudregues Apprentice
Joined: 29 Jan 2013 Posts: 231 Location: Brazil
|
Posted: Fri Nov 08, 2013 5:09 pm Post subject: |
|
|
tw04l124 wrote: | I think you can never know the dependencies and the risk involved. Considering config files are not that big no one really see a big benefit except a clean directory.
There are lint file removers who check for duplicates.
I personally suggest you do it manually as you never know what you break when you remove config files. E.G. Risk of an Unbootable System and other hassles.
I also realized the --depclean option of portage is very dangerous as it breaks packages later. E.G. Openoffice needs lots of tomcat-servlet-api and other java dependencies which are not in the ebuild. |
Humm... so it's not worth to do it? Cleaners directories are a benefit, not a great ones like auto-removing packages the frees HD but... If some ebuild doesn't list some dependencies it's an error from the maintainers and not portage. But I get the point, you mean if someone forgets to list one configuration file and the auto-remover removes it the damage can be really big, probably bigger than break packages...
Maitreya wrote: | You could manage your /etc in GIT |
Found this link searching on google:
https://www.linux.com/learn/tutorials/431119:weekend-project-using-git-to-manage-config-files
But it's not clear to me how could I take care of these orphan config files automatically... what's your point? _________________ Emerging en gentoo |
|
Back to top |
|
|
Maitreya Guru
Joined: 11 Jan 2006 Posts: 441
|
Posted: Fri Nov 08, 2013 8:04 pm Post subject: |
|
|
What I'm getting at is that there is no magical method to delete cruft after a considerable time without documentation.
Nobody wants to document. So if you were to track your /etc in git (or something else) you could see what was added and thus can make an assessment on what can be removed today.
Also a package is compiled in no-time. Can you say the same about the config files? I wouldn't want anything "automatic" running over that without backups. |
|
Back to top |
|
|
rudregues Apprentice
Joined: 29 Jan 2013 Posts: 231 Location: Brazil
|
Posted: Fri Nov 08, 2013 11:09 pm Post subject: |
|
|
Maitreya wrote: | What I'm getting at is that there is no magical method to delete cruft after a considerable time without documentation.
Nobody wants to document. So if you were to track your /etc in git (or something else) you could see what was added and thus can make an assessment on what can be removed today.
Also a package is compiled in no-time. Can you say the same about the config files? I wouldn't want anything "automatic" running over that without backups. |
Huummm now I get it! Thanks for the tip _________________ Emerging en gentoo |
|
Back to top |
|
|
Roman_Gruber Advocate
Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Sat Nov 09, 2013 12:46 pm Post subject: |
|
|
I remember to read somewhere gentoo does not touch /etc on purpose.
Thats why new config files are named ._cfg_0000_config_file or so.
Just imagine all the bugs related when a config file is removed and guys loose their functionality. Gentoo is about freedom.
I mostly check individual config files when a problem occurs but else I would never suggest to touch any.
When it works, don*t touch them. OFC I talk as a personal computer user, for server things it is maybe a security issue so you have plenty of paid time to have every config file right ... |
|
Back to top |
|
|
|