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.
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.
FS#61854 - The alpm-hooks man page should explain how globbing is done.
|
DetailsSummary and Info:
In the alpm-hooks(5) man page, the description of "Target", says: Shell-style glob patterns are allowed. This should be clarified, since the wildcards can match any characters in the file path, including '/'. This means that Target = usr/include/*.h matches all the .h files beneath /usr/include, not just the ones at the top level. This is (probably) what one wants, but it differs from the usual use of glob. It is like find /usr/include -name '*.h' as opposed to ls /usr/include/*.h The alpm-hooks man page should probably refer to fnmatch(3), and explain that that that fnmatch will be called without the FNM_PATHNAME or FNM_PERIOD (or any other) flags. ------------- Additional discussion: I discovered this while trying to write something to list all of the hooks that *would* be run if a given package were installed (or upgraded, or removed). As far as I can tell, this can't be done with any of the standard tools. (Am I missing something?) The targets in xorg-mkfontdir.hook confused me: Target = usr/share/fonts/*/ Target = !usr/share/fonts/encodings/* If these were "normal" globs, the second line would have no effect--a file in fonts/encodings/ can't be a sub-directory of fonts/. But this actually matches all directories underneath fonts/ *except* encodings/ or any of its sub-directories. IMHO, it would be simpler if the Targets were just regular expressions, but I'm sure that it's way too late in the game to consider that. As far as finding all of a package's hooks, it might be nice if pacman (and the alpm library) had a full-fledged --dry-run option, along the lines of "make -n", instead of just --print. The motivation for this is that a large update (involving about 170 packages) failed part-way thru, so the post-transaction hooks for the packages that were installed before the transaction got interrupted didn't get run. |
This task depends upon
Comment by Andrew Gregory (andrewgregory) -
Sunday, 24 February 2019, 23:04 GMT
Any changes need to be kept in sync with pacman.conf which uses the exact same "shell-style glob patterns".