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#42086 - Marking an orphaned packages as depenendency of another program.

Attached to Project: Pacman
Opened by Gordian Edenhofer (Edenhofer) - Tuesday, 23 September 2014, 13:44 GMT
Last edited by Andrew Gregory (andrewgregory) - Tuesday, 23 September 2014, 18:32 GMT
Task Type Feature Request
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 4.1.2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:
The "--asdeps and --asexplicit" flag of "pacman -D" offers you to mark packages, once installed as a dependency, to be reassigned as explicitly installed and vice versa. While this is great for a couple of reasons it is as bad when it comes to cleaning your host from orphaned packages (e.g. using "pacman -Qdtq"). When defining the installation reason of an optional dependency as dep you would get it listet as orphaned although it truly is not.
I would therefore recommend to introduce a new option; something like "--asdepof <package(s)1> <package(s)2>" which would mark package(s)1 to be a needed dependency of the specified package(s)2.

This would also come in handy in other cases:
Let's say you want the GNU Image Manipulation Program (short: "gimp") to be installed as long as there is the "gnome-session" package on your machine.
This task depends upon

Closed by  Andrew Gregory (andrewgregory)
Tuesday, 23 September 2014, 18:32 GMT
Reason for closing:  Implemented
Comment by Allan McRae (Allan) - Tuesday, 23 September 2014, 13:55 GMT
Optional dependencies of packages will not be listed as orphans by -Qtd in pacman-4.2. They can still be by -Qttd.

The other case I am not convinced by...
Comment by Gordian Edenhofer (Edenhofer) - Tuesday, 23 September 2014, 14:23 GMT
Actually they do get listet by pacman with -Qtd. See the following output:

--------------------------------------------------------------------------
[USER@XXXYYY:~]$ pacman -Qtd
cups 1.7.5-1
dosbox 0.74-6
hplip-plugin 3.14.6-3
lib32-alsa-plugins 1.0.28-1 <-------------------
lib32-giflib 5.1.0-1
lib32-gnutls 3.3.7-1
lib32-lcms2 2.6-1
lib32-libcl 1.1-1
lib32-libpulse 5.0-1
lib32-libxcomposite 0.4.4-2
lib32-libxinerama 1.1.3-1
lib32-libxslt 1.1.28-2
lib32-mpg123 1.20.1-1
lib32-openal 1.16.0-1
lib32-v4l-utils 1.2.1-1
python2-notify 0.1.1-13
python2-pillow 2.5.3-2
python2-pyqt4 4.11.2-1
python2-reportlab 3.1.8-1
rpcbind 0.2.1-5
samba 4.1.12-1
--------------------------------------------------------------------------
Here I just picked a random item of the above list to make the output shorter. One could also use "pacman -Rns $(pacman -Qtdq)" which would try to remove every orphaned packages, which in my case aren't orphaned at all.
--------------------------------------------------------------------------
[USER@XXXYYY:~]$ pacman -Rns lib32-alsa-plugins
checking dependencies...
:: lib32-libpulse optionally requires lib32-alsa-plugins: ALSA support
:: wine optionally requires lib32-alsa-plugins <--------------------

Packages (1): lib32-alsa-plugins-1.0.28-1

Total Removed Size: 0.18 MiB

:: Do you want to remove these packages? [Y/n] n
--------------------------------------------------------------------------

If they should not be listed my query would be a bug and I am going to reallocate it.
Comment by Andrew Gregory (andrewgregory) - Tuesday, 23 September 2014, 17:11 GMT
What version of pacman is that? 4.2 isn't out yet...
Comment by Gordian Edenhofer (Edenhofer) - Tuesday, 23 September 2014, 17:39 GMT
Pacman v4.1.2 - libalpm v8.0.2
Comment by Andrew Gregory (andrewgregory) - Tuesday, 23 September 2014, 17:44 GMT
As Allan said, this has been changed in git and as of 4.2 pacman will no longer print optdepends with -Qtd.
Comment by Gordian Edenhofer (Edenhofer) - Tuesday, 23 September 2014, 18:27 GMT
My fault, I misinterpreted Allan's post! I am trying to remove the request...

Loading...