You are not logged in.

#1 2021-03-09 11:48:51

mrbear
Member
Registered: 2020-04-09
Posts: 38

Remove optional dependency of dependency

Is it possible to remove optional dependencies of a dependency? For example: I need cmake, but I don't wan its graphical interface (cmake-gui) - if I try to remove it, pacman will spit "error: target not found: cmake-gui".

Offline

#2 2021-03-09 11:59:12

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Remove optional dependency of dependency

qt5-base is the optional dependency. If you want cmake-gui, then you need qt5-base. cmake-gui isn't a depedency, it's part of the cmake package. If that somehow bothers you (and it probably shouldn't), wiki->ABS.

On pacman -Qi and -Si, the thing before the : is the dependency. Everything after that is a comment.

Offline

#3 2021-03-09 12:00:28

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: Remove optional dependency of dependency

The cmake-gui binary is provided by the cmake package - it's *not* an optional or otherwise dependency for anything, but just a binary in the cmake package.
You can use NoExtract in your pacman.conf to keep the binary off your disk.

Edit: grumpf

Last edited by seth (2021-03-09 12:00:48)

Offline

#4 2021-03-09 12:43:08

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Remove optional dependency of dependency

seth wrote:

You can use NoExtract in your pacman.conf to keep the binary off your disk.

While it's true, is that something we should casually recommend?

Offline

#5 2021-03-09 12:54:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: Remove optional dependency of dependency

Should?
https://www.youtube.com/watch?v=5RyYrs5tu60

It's generally more likely safe to do that for executables (but not libraries) and certainly ok for everything that's a true leaf (which executables often are, of course you're in a bad place when you block dbus-daemon…)

So the recommendation is always specific and in the specific case there's no downside.
You're just loosing a Qt frontend for cmake which you then might miss in a graphical IDE - but then of course if you had that use-case, you'd not want to remove it itfp.
A further indicator is that qt5-base is an optional dependency for cmake and cmake-gui in particular.

So, I don't know whether we should, because we don't live in a shouldland.
But I feel comfortable telling somebody seeking to get rid of that binary to just add it to NoExtract. Yes.

If you worry that somebody might misunderstand that suggestion as "Hey, save space by bloating your NoExtract list w/o any idea what you're actually doing":
No - that's a really bad idea and not a message somebody should™ or I meant to send.

Offline

Board footer

Powered by FluxBB