PDA

View Full Version : [SOLVED] how to use yum-plugin-show-leaves ?



blnlx
22nd February 2010, 11:28 PM
I installed yum-plugin-show-leaves and yum-plugin-remove-with-leaves but I have no clue how to use them.

I was trying something like

yum list *foo* --show-leaves
but it gives me the following message:

Command line error: no such option: --show-leaves

Can someone please show me the correct way to apply/ use these YUM plug-ins?

Thanks in advance!

Hlingler
23rd February 2010, 12:00 AM
That plug-in is enabled by default. Note that it will only work when running YUM from CLI, in which case it will automatically list leaves upon new installs or removals (of higher-level packages in the dependency chain). There is no switch required (or possible) to invoke it. The notice is printed at the end of a transaction, if applicable. To the best of my knowledge, you cannot invoke it to predict future leaves on condition that a package might be installed, which appears to be what you are attempting. Nor is it even remotely useful when running 'yum list ...'.

V

blnlx
23rd February 2010, 02:19 PM
So if I understood you correctly these plug-ins are always active, i.e. whatever I do with YUM it will affect the leaves as well.

For example

yum remove foo
will remove foo package with leaves. Is that right?

Hlingler
23rd February 2010, 04:01 PM
No, that is not the function of the show-leaves plug-in. yum-plugin-show-leaves merely alerts you to new leaves, and works automatically (if enabled via it's config file /etc/yum/pluginconf.d/show-leaves.conf, as it is by default if installed) on any install/remove transaction (when YUM is run manually from CLI). This YUM plugin is unusual in not having a switch.

If you want YUM to (attempt to) remove all associated leaves when removing a higher-level package, then you want yum-plugin-remove-with-leaves. That plug-in works only (surprise!) when removing stuff, and it does require explicit invocation via CLI switch (even if enabled), e.g.:
yum --remove-with-leaves ...

I don't use it because it sucks, and it's dangerous.

Each of the YUM plug-ins has a different function, and a different switch (if applicable). Note also that piling on every available YUM plug-in is not a Good Idea™, for obvious reasons. You may install all, but use (enable) only those you truly need, disable the rest (via their config file[s]).

V

blnlx
24th February 2010, 03:19 PM
yum --remove-with-leaves ...

I don't use it because it sucks, and it's dangerous.


I'm curious why do you think this plug-in is dangerous?


Actually, what I would like to do is (at least I hoped that these plug-ins can do),
use yum-plugin-show-leaves to list the leaves that are going to be removed when yum-plugin-remove-with-leaves is applied. This is to avoid unpleasant surprises.

Apparently this is not the use-model for these plug-ins.

Hlingler
24th February 2010, 04:04 PM
I'm curious why do you think this plug-in is dangerous?Last time I tried it (admittedly quite a while ago) it wanted to erase half of my OS, literally.
Actually, what I would like to do is (at least I hoped that these plug-ins can do),
use yum-plugin-show-leaves to list the leaves that are going to be removed when yum-plugin-remove-with-leaves is applied. This is to avoid unpleasant surprises.You can (attempt to) use yum-plugin-remove-with-leaves to do that. It's supposed to drag out leaves with the higher-level package(s), so the leaves should appear on the transaction list, although it may not be immediately obvious as to why they are appearing in that list (especially in large transactions), but perhaps the output will give clues. Note however that just because a package is no longer required does not mean that it is not useful (to you). As always, using the '-y' switch for YUM is strongly discouraged.

V

blnlx
24th February 2010, 11:40 PM
Thanks for the explanation.
Now I have better idea how to use these plug-ins.