Any way to list leaf packages?

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
GJones
Donor
Posts: 300
Joined: 22. Jul 2011, 23:27

Any way to list leaf packages?

Post by GJones »

First of all, thank you for creating this distribution. It's pretty much what I've always been looking for in Linux.

Anyway...

One of the things I've noticed about slapt-get is that it doesn't handle orphan package removal automatically. That's one of the luxuries of systems like pacman and APT, and it's nice to have, but one can do without it.

However, let's say I want to remove some unneeded packages by hand. In that case it would help to have a way to list leaf packages - installed packages that are not dependencies of anything. This way, if I removed a package and it left dependencies behind, I could look at the leaves and remove what I didn't need - without requiring something complex like 'apt-get autoremove'.

But as far as I can tell, slapt-get does not offer the ability to list leaf packages.

Is there any way to get a list of leaf packages? A utility in the repositories, or failing that, a script that someone's hacked together? Or is this functionality just not supported?
User avatar
gapan
Salix Wizard
Posts: 6244
Joined: 6. Jun 2009, 17:40

Re: Any way to list leaf packages?

Post by gapan »

What you're asking for is:
1. Dangerous
2. Completely unnecessary

For more details, read this topic about it: http://salixos.org/forum/viewtopic.php?f=22&t=856
Image
Image
GJones
Donor
Posts: 300
Joined: 22. Jul 2011, 23:27

Re: Any way to list leaf packages?

Post by GJones »

Is listing leaf packages functionally the same kind of problem as listing true orphans? I was under the impression that it was less complicated and less prone to errors (thus its use by *BSD), but I'm not well versed on higher math, so I could be wrong.

Re dangerous, I won't argue that it's not. A lot of distributions make it relatively painless, but there's always the possibility that a necessary library will be wrongly listed as a leaf (or removed automatically, depending on the package manager).

As for necessary, strictly speaking, you're right. It is useful for saving some space on backups and whatnot, in the hands of an experienced user. It's not something for novices to use routinely, and I certainly don't think it should be integrated into a GUI or anything.
User avatar
gapan
Salix Wizard
Posts: 6244
Joined: 6. Jun 2009, 17:40

Re: Any way to list leaf packages?

Post by gapan »

GJones wrote:Is listing leaf packages functionally the same kind of problem as listing true orphans? I was under the impression that it was less complicated and less prone to errors (thus its use by *BSD), but I'm not well versed on higher math, so I could be wrong.
Your post is the first time I've seen the term "leaf packages" mentioned anywhere. Your description:
installed packages that are not dependencies of anything
is exactly what I know "orphan" packages to be.
Image
Image
GJones
Donor
Posts: 300
Joined: 22. Jul 2011, 23:27

Re: Any way to list leaf packages?

Post by GJones »

Ah. As I understood it, a leaf package is one that nothing depends on, and which may or may not have been deliberately installed. Whereas an orphan package is one that was only installed as a dependency of something, and is no longer needed.

But it strikes me now that such definitions are only valid for package management systems like APT, which track whether packages are installed deliberately or as dependencies - and slapt-get doesn't do that.

Anyway, if you consider it too dangerous and not useful enough to implement, I'll not pester you about it.

... And actually, thanks. If I ever get around to creating my own distro (when I've got the time, and hopefully the knowledge), knowing I shouldn't bother with orphan package handling might be an advantage in terms of effort needed.
User avatar
Duncan_Idaho
Posts: 216
Joined: 19. Sep 2009, 01:43
Location: Sietch Tabr, Planet Arrakis

Re: Any way to list leaf packages?

Post by Duncan_Idaho »

If you are asking about how to handle orphan packages then I guess that you come from using debian or ubuntu based distros, but first you need to know the differences in "packaging philosophies" between debian and slackware.
In debian packages tend to be more modular because libraries, headers, documentation and sources each has thier own package, so after installing a few things you may end with a myriad of packages.
In slackware packages tend to be more monolithic and -following the previous example- libraries, headers, documentation and sources are all contained in the same package.
So if you go carelessly deleting "unwanted" pakages in slack you could end in some serious problems of missing files or whatnot.
I hope this helps you to have a clearer picture as to why gapan said that it's dangerous
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: Any way to list leaf packages?

Post by thenktor »

GJones wrote:Ah. As I understood it, a leaf package is one that nothing depends on, and which may or may not have been deliberately installed. Whereas an orphan package is one that was only installed as a dependency of something, and is no longer needed.
For me this sounds the same.

Furthermore it IMHO is useless to add such a complicated feature just for the sake of removing few unneeded packages and save some MB on the disk.
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
Post Reply