You are not logged in.

#1 2013-01-25 21:17:45

spirtbrat
Member
Registered: 2011-02-19
Posts: 16

What qualifies as a unrequired package (-Qt) ?

Is anybody familiar with how pacman qualifies a package as unrequired (-Qt).
When I run 'pacman -Qtd', it returns packages that are optional dependencies of explicitly installed packages.
How is that unrequired and is pacman supposed to recognize them as such ?

[ ~]$ pacman -Qtdq
linux-headers
modemmanager
usb_modeswitch
[ ~]$
[ ~]$
[ ~]$ pacman -Qi modemmanager usb_modeswitch linux-headers | grep "Install Reason"
Install Reason : Installed as a dependency for another package
Install Reason : Installed as a dependency for another package
Install Reason : Installed as a dependency for another package
[ ~]$ 
[ ~]$ pacman -Si catalyst-dkms | grep "Optional Deps"
Optional Deps  : linux-headers: build the module against Arch kernel
[ ~]$
[ ~]$ pacman -Qi catalyst-dkms | grep "Install Reason"
Install Reason : Explicitly installed
[ ~]$
[ ~]$
[ ~]$ pacman -Si networkmanager | grep "Optional Deps"
Optional Deps  : modemmanager: for modem management service
[ ~]$
[ ~]$ pacman -Qi networkmanager | grep "Install Reason"
Install Reason : Installed as a dependency for another package
[ ~]$
[ ~]$
[ ~]$ pacman -Si modemmanager | grep "Optional Deps"
Optional Deps  : usb_modeswitch: install if your modem shows up as a storage drive
[ ~]$
[ ~]$ pacman -Qi modemmanager | grep "Install Reason"
Install Reason : Installed as a dependency for another package

Offline

#2 2013-01-25 21:20:43

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 5,077

Re: What qualifies as a unrequired package (-Qt) ?

Unrequired just means that it's not a required dependency of something else. Optional, by definition, is not required.

Offline

#3 2013-01-25 21:23:02

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: What qualifies as a unrequired package (-Qt) ?

When I issue the command, I get nothing at all. The reason is that none of the packages were installed as dependencies for other packages but were installed explicitly. If you, for instance, install 'linux-headers' explicitly, it won't be listed by pacman -Qdt as well even if you install (and then uninstall) another package for which it is an optional dependency. Your action -- installing a package explicitly or not -- determines the output of the command in question.

Last edited by bohoomil (2013-01-25 21:25:49)


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#4 2013-01-25 22:42:55

spirtbrat
Member
Registered: 2011-02-19
Posts: 16

Re: What qualifies as a unrequired package (-Qt) ?

Maybe I should rephrase the question.

Scimmia wrote:

Unrequired just means that it's not a required dependency of something else. Optional, by definition, is not required.

An optional dependency is not required in a way that it not necessarily needs to be installed for the parent package to function.
But when installed, this dependency is not an orphan package - it has a parent that relates to it, albeit optionally at first.

@bohoomil

I don't want to install 'linux-headers' explicitly, because this package serves _me_ no purpose.
It is installed because 'catalyst-dkms' needs it to rebuild the kernel module on package or kernel update.
I expect this relation to be tracked by pacman and when I eventually remove the explicit package with 'pacman -Rc" - the whole chain gets removed, leaving no dangling orphans behind.
I use 'pacman -Qtd' to check for orphan packages left installed from previous manipulations.

'pacman -Qtd' returning non-orphans got me thinking that either:

- this is not the way to track orphans (if true - what is the way ?)
or
- it is indeed a bug in this functionality and I should file a report.

Offline

#5 2013-01-27 01:54:50

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,058

Re: What qualifies as a unrequired package (-Qt) ?

Here is a relevant bug report:

https://bugs.archlinux.org/task/11337

Also see:

https://wiki.archlinux.org/index.php/Us … OptDepends

Last edited by anonymous_user (2013-01-27 01:56:10)

Offline

#6 2013-01-27 02:13:56

spirtbrat
Member
Registered: 2011-02-19
Posts: 16

Re: What qualifies as a unrequired package (-Qt) ?

Thank you!
This is what I needed.

Offline

#7 2013-01-27 05:46:37

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,698
Website

Re: What qualifies as a unrequired package (-Qt) ?

While waiting for true optdep support in Pacman, you may find this useful.

Offline

Board footer

Powered by FluxBB