Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Portage improve suggestion for reverse dependencies
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
JeroenV
Guru
Guru


Joined: 16 Jul 2002
Posts: 447
Location: Amsterdam / Hamburg

PostPosted: Thu Nov 21, 2002 5:27 pm    Post subject: Portage improve suggestion for reverse dependencies Reply with quote

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 8)
Jeroen
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
May The Source be with you!
Back to top
View user's profile Send private message
choward
Tux's lil' helper
Tux's lil' helper


Joined: 08 Nov 2002
Posts: 92

PostPosted: Thu Nov 21, 2002 5:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
AlterEgo
Veteran
Veteran


Joined: 25 Apr 2002
Posts: 1619

PostPosted: Thu Nov 21, 2002 6:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Thu Nov 21, 2002 6:59 pm    Post subject: Reply with quote

It might be useful to post any concrete suggestions that come out of here to Bug 2938: including dependancy ability into portage.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
JeroenV
Guru
Guru


Joined: 16 Jul 2002
Posts: 447
Location: Amsterdam / Hamburg

PostPosted: Thu Nov 21, 2002 8:23 pm    Post subject: Reply with quote

I agree with choward, I didn't think it over carefully enough :oops:
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 8)
Jeroen
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
May The Source be with you!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum