Opened 6 months ago
Last modified 5 months ago
#18670 new enhancement
[pkgman] Let pkgman list leaf packages
Reported by: | haikupr | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Applications/Command Line Tools | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | #15567 | Blocking: | |
Platform: | All |
Description
I was trying to shrink the number of installed packages in order to quicken my Haiku's boot time. In order to do so I searched for a canned way to list all the installed leaf packages, ie. the ones which were once installed as a dependency be are now useless to the set of installed packages, and those I could remove safely. I found no easy way to obtain that list. Would it be possible to expand pkgman to be able to only list leaf package? Command line usage could look like pkgman search --leaf
or something similar.
Change History (5)
comment:1 by , 6 months ago
Component: | Sys-Admin → Applications/Command Line Tools |
---|---|
Keywords: | pkgman leaf removed |
Owner: | changed from | to
Summary: | Let pkgman list leaf packages → [pkgman] Let pkgman list leaf packages |
comment:4 by , 5 months ago
Not exactly what you want, but until the function is implemented this script can give you a subset of the packages that no other package depends on. Notice though it doesn't know whether they came as a dependency or you installed them yourself.
comment:5 by , 5 months ago
Somewhat similar to madmax's script, there's my `pkgman search --not-required` proof of concept :-)
Some months ago, I implemented that search --not-required
in pkgman
proper in two ways:
- The first one following that naive/quick-and-dirty implementation (slightly inaccurate, pretty fast!).
- the second, more accurate (takes versions into account), but scales poorly with the number of packages.
When used to only list *installed* packages that are not required, both take < 0.25s (having 500+ packages installed), but when doing it for ALL packages, the second version takes around 15 seconds, IIRC (on my Phenom II VM).
I should probably give it another go, and at least submit the second for review, in hopes there's anything salvageable.
Maybe something better can be written, and added to PackageKit's LibsolvSolver::FindPackages()
, for example? (task for better programmers than I).
I thought we had a ticket similar to this already, but now I can't find it.