Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 100379 - Portage should detect unused libraries and allow users to unmerge them.
Summary: Portage should detect unused libraries and allow users to unmerge them.
Status: RESOLVED DUPLICATE of bug 2938
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-26 10:31 UTC by Benjamin Schulz
Modified: 2005-08-06 09:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Schulz 2005-07-26 10:31:44 UTC
Portage should have an option to search all ebuilds which do not explicitely
depend on other ebuilds.

This would give a list of applications and libraries. The user might then
unmerge himself the unused libraries or applications he does not want anymore.

This would perhaps be better than depclean, since only unused programs are
detected and the user is left with what he wants to unmerge.


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2005-07-26 12:48:57 UTC
Can you give a real world example? I have major problems understanding what
you're after.
Comment 2 Benjamin Schulz 2005-07-26 15:30:30 UTC
Ok. 
When updating a system, many applications need new librarys. And many do not 
need the old librarys anymore. I do not mean version numbers but say, an 
Application-version1 needs libone-version1 and Application-version2 needs only 
libdifferent-version 1.
The old libone-version1 will not be unmerged by an 
emerge -uD world. 
This means that during the years, one has a growing and growing disk with 
unneeded librarys. the output of emerge --depclean does very much depend on the 
world file. I don't think that this is a good solution since a user might have 
emerged libone directly.

I think the only solution to this dilemma is the following:
a command emerge --searchalldeps

which prints out all packages, which no other package needs to work. Of course 
it will print out all programs like nano or koffice or what so ever. But it 
will also print old programs which the user has simply forgotten and, more 
important: it will give out those librarys which no one needs and can be deleted

an example:

emerge --searchalldeps

output:
App_office
  koffice
  nano 
  emacs
Sys-libs
  un-needed-library1
  un-needed-library2
  old-library3

and so on.
Since it is detected that no ebuild depends on un-needed-library1, un-needed-
library2, old-library3, the user might consider to unmerge these old ebuilds 
and has no risk to damage his system.


Comment 3 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-07-28 05:39:36 UTC
Portage doesn't have the dependency information to do what you are after.  Many 
dependencies are implied in the current setup.  We would need developers to 
specify much more detailed DEPEND, RDEPEND, and BDEPEND ( IIRC ) atoms in the 
ebuilds in order for this to be done.  Since BDEPEND support isn't planned for 
stable this feature probably won't be in for a while.  I believe the developers 
are planning on the next revision of portage having much better dependency 
tracking where old unused libs are in fact removed when they are no longer 
needed.
Comment 4 Benjamin Schulz 2005-07-28 05:57:51 UTC
Portage might not have this information. It would indeed require much storage.
But might it able to write code for gathering it?

One needs simply a list with all ebuilds installed in world and notice the
depencies in a list. When in the depency list an ebuild in the ebuild list is
found, mark the item in the ebuild list and also in the depency list. 
Then, at the end one has some ebuild items that are not marked, and these are
those which no other ebuilds depend on.
Additionally one would have these ebuilds marked which some other ebuilds depend
on and are missing.
This should not be too difficult to implement.
Comment 5 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-08-06 09:26:05 UTC
Basically asking for a similar thing, a list of packages/libs that are no longer 
depended on.

*** This bug has been marked as a duplicate of 2938 ***