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#58900 - alpm-hooks: allow NeedsTargets to pass more information to stdin of commands

Attached to Project: Pacman
Opened by Eli Schwartz (eschwartz) - Wednesday, 06 June 2018, 22:46 GMT
Last edited by Eli Schwartz (eschwartz) - Tuesday, 25 February 2020, 05:33 GMT
Task Type Feature Request
Category Backend/Core
Status Unconfirmed
Assigned To No-one
Architecture All
Severity Low
Priority Low
Reported Version 5.1.0
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 2
Private No

Details

alpm-hooks are neat and allow lots of neat things, but one thing they cannot do very well is do things based on arbitrary metadata about a package.

Inspired by  FS#6510  which asked for support for restricting packages based on licenses. This is the first use-case for this feature which comes to my mind, but I'm sure inventive users can think of many other ways to leverage this.

A hook could shell out to expac in order to get package metadata, using the pkgnames reported on stdin by NeedsTargets, which works fairly well for PostTransaction hooks as by that time we can reliably determine everything there is to know about the packages which were just installed, but that excludes PreTransaction hooks, which cannot discover anything about a package installed via pacman -U foo.pkg.tar.xz and cannot know which repository to query for packages installed via pacman -S foo.

Therefore it would be nice to have e.g. "PrintfTargets = %n" or something, which allows customizing the information passed to a hook command using arbitrary metadata keys in a custom formatter.
This task depends upon

Comment by Allan McRae (Allan) - Wednesday, 06 June 2018, 22:54 GMT
I can see this as a feature that never gets used...

Loading...