Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#57191 - pacman -Qdt misses optional dependency cycles

Attached to Project: Pacman
Opened by Yakumo Ran (kitsunyan) - Monday, 22 January 2018, 13:19 GMT
Last edited by Allan McRae (Allan) - Monday, 22 January 2018, 21:10 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 5.0.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Pacman 5.0.2

# pacman -S --asdeps npm

npm depends on nodejs while nodejs optionally depends on npm. In this case

$ pacman -Qdt npm

prints nothing and exits with 1.

I'm used to use `pacman -Qdtq | sudo pacman -Rsn -` to remove orphans but it doesn't work for npm package which I install sometimes to build some packages.
This task depends upon

Closed by  Allan McRae (Allan)
Monday, 22 January 2018, 21:10 GMT
Reason for closing:  Not a bug
Comment by Allan McRae (Allan) - Monday, 22 January 2018, 13:30 GMT
-t, --unrequired list packages not (optionally) required by any package (-tt to ignore optdepends) [filter]

pacman -Qttd lists npm.
Comment by Yakumo Ran (kitsunyan) - Monday, 22 January 2018, 17:17 GMT
Yes, but it's correct to have optional dependencies installed as dependencies, in this case I can keep optional packages dependent on some package and remove all these packages with the explicitly installed package in the future. I always install optional dependencies with --asdeps flag. So of course I can't use `pacman -Qdttq | sudo pacman -Rsn -` since it will remove optional dependencies I'm keeping as dependencies which are needed for me.

Both npm and nodejs installed as dependencies, there are no explicit packages dependent on them. But they aren't listed with pacman -Qdt. The behavior I'm talking about in the report is definitely incorrect.
Comment by Allan McRae (Allan) - Monday, 22 January 2018, 21:10 GMT
npm is an optional dependency for for nodejs
nodejs is a dependency for for npm semver

"pacman -Qtd" will not show it as both packages are required or optionally required by other packages.
"pacman -Qttd" does show it, because npm is not directly required by anything.

So this is working completely as documented.

Loading...