View previous topic :: View next topic |
Author |
Message |
JeroenV Guru
Joined: 16 Jul 2002 Posts: 447 Location: Amsterdam / Hamburg
|
Posted: Thu Nov 21, 2002 5:27 pm Post subject: Portage improve suggestion for reverse dependencies |
|
|
Hi,
Wouldn't it be neat to hace a feature in Portage that removes all unused libs?
A possible way to implement this would be to use something like a "usage hierarchy" with a "level"property for each "node". Something like this:
Code: |
sylpheed (E) mozilla (E) sylpheed (E) pan (E)
| | | |
-------------------- ------------------
| |
libssl (L) libxface (L)
| |
---------------------------------------------
|
libip4 (L)
with:
(E) end user app
(L) lib
(names are fictional)
|
Now if sylpheed AND mozilla would be removed, libssl could also be removed, because it meets 2 conditions:
1) it is not needed by "higher" progs
2) it has no (E) status, which means it is also not needed by the user
What do you think? _________________ Cheers
Jeroen
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
May The Source be with you! |
|
Back to top |
|
|
choward Tux's lil' helper
Joined: 08 Nov 2002 Posts: 92
|
Posted: Thu Nov 21, 2002 5:41 pm Post subject: |
|
|
Seems reasonable, but wouldn't reference counting be easier? When a package is installed that depends on another package, the base package has its use count increased. When a package is removed, all dependencies have their use count decreased. All packages that are dependencies of the removed package that now have a use count of 0 can be removed too. _________________ Craig Howard
4B Computer Science -- University of Waterloo |
|
Back to top |
|
|
AlterEgo Veteran
Joined: 25 Apr 2002 Posts: 1619
|
Posted: Thu Nov 21, 2002 6:58 pm Post subject: |
|
|
Have you seen this thread ?
It deals with the exact same subject, and offers some approaches that are quite similar, with working (but maybe dangerous) scripts to do the trick. |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
|
Back to top |
|
|
JeroenV Guru
Joined: 16 Jul 2002 Posts: 447 Location: Amsterdam / Hamburg
|
Posted: Thu Nov 21, 2002 8:23 pm Post subject: |
|
|
I agree with choward, I didn't think it over carefully enough
I posted a reference-count reverse dependency tracking feature request to bug 2938: Quote: | Suggestion: implement reverse dependency tracking using reference counts:
every package has a reference counter indicating how many packages that depend
on it are installed. Whenever reference count for a package is 0, it will be
automatically removed.
Maybe extra feature: at the end of the "dependency chain" the reference count is
inherently always 0, which means that end-user applications will always be
automatically removed. To avoid this, we could have a flag indicating that it is
an end user app. |
I know there are some scripts, but I really think this stuff belongs in Portage _________________ Cheers
Jeroen
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
May The Source be with you! |
|
Back to top |
|
|
|