View previous topic :: View next topic |
Do you believe that an automated system for old package deletion would be usefull? |
Yes, make it default |
|
9% |
[ 8 ] |
Yes, but prompt me before you do anything |
|
18% |
[ 15 ] |
Yes, let me configure it in make.conf |
|
52% |
[ 43 ] |
No, I prefer to do it myself |
|
18% |
[ 15 ] |
I really don't know |
|
1% |
[ 1 ] |
|
Total Votes : 82 |
|
Author |
Message |
ASID Apprentice
Joined: 22 Mar 2006 Posts: 195
|
Posted: Thu Oct 26, 2006 9:41 am Post subject: Automatic deletion of old packages |
|
|
I was wandering around the other day, in one of my gentoo machines, a kind of old one, with a 40G hard drive, when I typed
The result was something I was not expecting... /dev/hda3 -> use 89%! Where? When? Well... Yes, I keep my system up to date so it must be the distfiles. I checked. 5,4G for the distfiles/ directory. Around 4 of them occupied by old useless packages, some of which don't even exist!
OK the solution is the rm command. The easiest way is to delete everything in there but again, packages that I might need in the future will be also gone. I don't want to spend my bandwidth to download again Openoffice because a patch came out or because I changed a USE flag. So what?
Here is the trick. Add something like:
Code: | DELETE_OLD_PACKAGES="yes" | or
Code: | KEEP_PACKAGE_DEPTH="1" | to the make.conf file. The first one would just delete the old package once the new one is downloaded. It could also delete packages that the old one depended on, but the new doesn't.
Code: | DELETE_DEP_PACKAGES="yes" |
The second one could give the depth of the old versions to keep, in case someone wants to be sure that he can return to the old stable when something goes wrong with the new one. the "1" indicates to keep the new one, plus one version older. "0" forjust the new one, "2" for new plus the last two versions and so on. This could save space and time to those that have neither...
The same can be applied to /var/tmp/portage
Of course I want to read you opinion and suggestions.
Have fun! |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Thu Oct 26, 2006 9:55 am Post subject: |
|
|
*/tmp/* you can delete anyway. Nothing worth keeping in there (as long as the programs are no longer running). That's why it's called temporary files. As for cleaning distfiles folder, there already are tools for that (in gentoolkit package or some other, I don't really remember). Even without tool you could probably just delete by access time or something... |
|
Back to top |
|
|
ASID Apprentice
Joined: 22 Mar 2006 Posts: 195
|
Posted: Thu Oct 26, 2006 10:03 am Post subject: |
|
|
You mean eclean. Yes, this is a tool to manually delete those files. I'm asking for an automated procedure that could run when you build (update) a package and which could make use of eclean for the actual deletion...
Quote: | Even without tool you could probably just delete by access time or something. |
As I said, rm is your friend but not your best one |
|
Back to top |
|
|
rasmussen Tux's lil' helper
Joined: 31 Aug 2002 Posts: 142 Location: .se
|
Posted: Thu Oct 26, 2006 10:08 am Post subject: |
|
|
Wouldn't putting eclean in a cron job suffice? _________________ When your thread is resolved, putting "[SOLVED]" in its title helps all Gentooers. |
|
Back to top |
|
|
ASID Apprentice
Joined: 22 Mar 2006 Posts: 195
|
Posted: Thu Oct 26, 2006 10:49 am Post subject: |
|
|
Quote: | Wouldn't putting eclean in a cron job suffice? |
Well, stucking with eclean is not always an option. Some people haven't heard of it. Others don't know how to use it. Maybe others don't want to emerge gentoolkit or don't know how to use cron (gentoo is all about choise afterall). People with medium knowledge on gentoo will propably have to face the problem before running into eclean.
Except eclean, there are many scripts that could clean your distfiles directory. Take a look at this thread:
https://forums.gentoo.org/viewtopic-t-507044-highlight-eclean.html
As mv says:
Quote: | eclean is not too realiable, since it parses the SRC_URI only heuristically (e.g. conditionals like USE or LINGUAS are not taken into account which can be a big deal, for instance with acroread).
An absolutely reliable (though rather slow) way is the trickyfetch script from http://www.mathematik.uni-wuerzburg.de/~vaeth/gentoo/index.html |
Each script has its pros and cons...
Either way, all clean scripts do the job for the whole distfiles directory, not exactly after the upgrade. What I'm saying is that in an automated procedure, after the compilation, an einfo would give you an overview of the packages that would be deleted because of the upgrade. This would happen on the fly, just for the upgraded package and not for the whole distfiles directory.
This could be added as a standard and you wouldn't need to be an expert, or search a tone of forums to learn how to use tools you might not use again in your life. |
|
Back to top |
|
|
rokstar83 Guru
Joined: 09 Apr 2005 Posts: 423 Location: MD
|
Posted: Fri Oct 27, 2006 9:01 pm Post subject: |
|
|
You may want to ask the mods to move this thread over into the new fangled User rep discusion forum as it was created for new features and enhancements suggestions. |
|
Back to top |
|
|
ASID Apprentice
Joined: 22 Mar 2006 Posts: 195
|
Posted: Mon Oct 30, 2006 7:44 am Post subject: |
|
|
Quote: | You may want to ask the mods to move this thread over into the new fangled User rep discusion forum as it was created for new features and enhancements suggestions.
|
Of course!
Thanks rokstar83. |
|
Back to top |
|
|
kallamej Administrator
Joined: 27 Jun 2003 Posts: 4975 Location: Gothenburg, Sweden
|
Posted: Mon Oct 30, 2006 8:33 am Post subject: |
|
|
Moved from Gentoo Chat to Gentoo User Representatives. _________________ Please read our FAQ Forum, it answers many of your questions.
irc: #gentoo-forums on irc.libera.chat |
|
Back to top |
|
|
rokstar83 Guru
Joined: 09 Apr 2005 Posts: 423 Location: MD
|
Posted: Mon Oct 30, 2006 4:31 pm Post subject: |
|
|
I would love to see some more auto-cleaning/cleaning options built into emerge. Aside from the distfiles i've noticed my /var/tmp/portage/ directory getting full when a emerge fails. The problem is I eventually get the issue resolved and it doesn't remove the dir. If you've ever had open office fail on you during a build, it leaves one huge mess. Granted this opinion comes with my limited knowledge of how this all works and in no regard considers how feasible it is. |
|
Back to top |
|
|
boniek Guru
Joined: 26 Mar 2005 Posts: 373
|
Posted: Mon Oct 30, 2006 10:15 pm Post subject: |
|
|
We need something like apt-get autoremove in portage. It basically removes package with all its dependecies unless they are used by other package. It helps to keep our systems clean. _________________ [HOWTO]New freetype subpixel font rendering for lcd monitors |
|
Back to top |
|
|
omp Retired Dev
Joined: 10 Sep 2005 Posts: 1018 Location: Glendale, California
|
Posted: Tue Oct 31, 2006 12:46 am Post subject: |
|
|
Not too bad of an idea, but I'd hate to see it be done by default. _________________ meow. |
|
Back to top |
|
|
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Tue Oct 31, 2006 5:17 am Post subject: |
|
|
i'd like to see it done but not in make.conf because some files that can be deleted would be best left for varying amount of times. For instance, when testing distfiles are useful for up to 3 months (that is a bit of an exaggeration and would mean that you'd have a very slow dev like omp ) but /tmp stuff is useless within about 6 hours. Logs would be another one, certain logs should be kept for longer.
All in all i think logging should be in rc.conf or similar _________________ https://otw20.com/ OTW20 The new place for off the wall chat |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Fri Dec 08, 2006 4:04 pm Post subject: |
|
|
cokehabit wrote: | i'd like to see it done but not in make.conf because some files that can be deleted would be best left for varying amount of times. For instance, when testing distfiles are useful for up to 3 months (that is a bit of an exaggeration and would mean that you'd have a very slow dev like omp ) but /tmp stuff is useless within about 6 hours. Logs would be another one, certain logs should be kept for longer.
All in all i think logging should be in rc.conf or similar |
I agree about the logging stuff, but don't see how it applies to make.conf wrt old distfile deletion. That sounds like something I'd expect to configure in make.conf. In either case, we still need to address the issue of varying times; I thought the depth level was a good sol'n. |
|
Back to top |
|
|
Conan Guru
Joined: 02 Nov 2004 Posts: 360
|
Posted: Sat Dec 09, 2006 5:19 am Post subject: |
|
|
boniek wrote: | We need something like apt-get autoremove in portage. It basically removes package with all its dependecies unless they are used by other package. It helps to keep our systems clean. |
emerge -C package && emerge --depclean |
|
Back to top |
|
|
Conan Guru
Joined: 02 Nov 2004 Posts: 360
|
Posted: Sat Dec 09, 2006 5:21 am Post subject: Re: Automatic deletion of old packages |
|
|
ASID wrote: | I was wandering around the other day, in one of my gentoo machines, a kind of old one, with a 40G hard drive, when I typed
The result was something I was not expecting... /dev/hda3 -> use 89%! Where? When? Well... Yes, I keep my system up to date so it must be the distfiles. I checked. 5,4G for the distfiles/ directory. Around 4 of them occupied by old useless packages, some of which don't even exist!
OK the solution is the rm command. The easiest way is to delete everything in there but again, packages that I might need in the future will be also gone. I don't want to spend my bandwidth to download again Openoffice because a patch came out or because I changed a USE flag. So what?
Here is the trick. Add something like:
Code: | DELETE_OLD_PACKAGES="yes" | or
Code: | KEEP_PACKAGE_DEPTH="1" | to the make.conf file. The first one would just delete the old package once the new one is downloaded. It could also delete packages that the old one depended on, but the new doesn't.
Code: | DELETE_DEP_PACKAGES="yes" |
The second one could give the depth of the old versions to keep, in case someone wants to be sure that he can return to the old stable when something goes wrong with the new one. the "1" indicates to keep the new one, plus one version older. "0" forjust the new one, "2" for new plus the last two versions and so on. This could save space and time to those that have neither...
The same can be applied to /var/tmp/portage
Of course I want to read you opinion and suggestions.
Have fun! |
add eclean to the EBUILD_POST phase of your /etc/portage/bashrc if you want it run after _every_ emerge or a script that calls eclean dist to your /etc/portage/postsync.d directory if you want it run after every sync (a bit less time consuming)
Your later claim that that reduces the discoverability is silly, because all of your ideas would have old discoverability. Your deleting dependcies idea would require portage to fully support reverse deps, which it doesn't currently. depclean does a fairly good job at it however. |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Sun Dec 10, 2006 7:30 pm Post subject: Re: Automatic deletion of old packages |
|
|
Conan wrote: | add eclean to the EBUILD_POST phase of your /etc/portage/bashrc if you want it run after _every_ emerge or a script that calls eclean dist to your /etc/portage/postsync.d directory if you want it run after every sync (a bit less time consuming)
Your later claim that that reduces the discoverability is silly, because all of your ideas would have old discoverability. Your deleting dependcies idea would require portage to fully support reverse deps, which it doesn't currently. depclean does a fairly good job at it however. |
So for those of us who don't know eclean, can you tell us what commands you'd use? Which pkg is depclean in? (RTFM I know, but we need it documented and you know the answer ) |
|
Back to top |
|
|
boniek Guru
Joined: 26 Mar 2005 Posts: 373
|
Posted: Sun Dec 10, 2006 8:39 pm Post subject: |
|
|
Conan wrote: | boniek wrote: | We need something like apt-get autoremove in portage. It basically removes package with all its dependecies unless they are used by other package. It helps to keep our systems clean. |
emerge -C package && emerge --depclean |
No. It doesn't work the same way I described. Check paludis and it's --with-unused-dependencies option to see what I meant (and this topic). _________________ [HOWTO]New freetype subpixel font rendering for lcd monitors |
|
Back to top |
|
|
ASID Apprentice
Joined: 22 Mar 2006 Posts: 195
|
Posted: Mon Dec 11, 2006 8:19 am Post subject: Re: Automatic deletion of old packages |
|
|
Quote: | Your later claim that that reduces the discoverability is silly, because all of your ideas would have old discoverability. |
I'm sorry, did I miss something? Where do I claim the above? |
|
Back to top |
|
|
|