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#40779 - Provide a way for a package to claim unowned files
|
DetailsA common packaging issue is having a file added to a package that was previously created by an install script or during running of a package. This causes a conflict which requires manual intervention. It would be good to provide a way for a package to claim these files to avoid this.
e.g. claimfiles=(usr/lib/foo/foo.pyc) |
This task depends upon
I'd suggest either adding some option like -D --add-file which can/should be called by a pre-conflict-check hook (requires hook support) or if there is lua hook support exposing some function that allows to change the transaction so the conflicting file is added to the old package.
A simple value in the pkgbuild is bad because it can't do any detection if the file is of a certain type (like a symlink) and it can't make sure the command is only run if the old package was a certain version (vercmp).
1) A value in the PKGBUILD would just be used if a conflict is detected for that file and the file is unowned. So it does not depend on package version at all. I do not understand your point about file type (or even how you are providing that information to pacman, or the package version, with -D --add-file).
2) I am not sure any hook could be run before conflict checking - running a hook and then aborting the transaction due to a conflict could leave a system in an unusable state.