FS#47949 - [pacman] Suggested pacman -F UI changes
Attached to Project:
Pacman
Opened by Earnestly (Earnest) - Saturday, 30 January 2016, 02:10 GMT
Last edited by Allan McRae (Allan) - Tuesday, 05 November 2019, 05:03 GMT
Opened by Earnestly (Earnest) - Saturday, 30 January 2016, 02:10 GMT
Last edited by Allan McRae (Allan) - Tuesday, 05 November 2019, 05:03 GMT
|
Details
These are my opinionated changes to the semantics of pacman
-F to more closely
follow pkgfile allowing additional operations to be removed. I present only three changes and demonstrate the ideal output from pacman -F with a pkgfile example as a reference. The use of -q, -l or -y is unchanged. 1) pacman -F should mimic pkgfile with no arguments specified % pkgfile /usr/share/vim/vimfiles/syntax/PKGBUILD.vim core/pacman % pkgfile PKGBUILD.vim core/pacman % pacman -F /usr/share/vim/vimfiles/syntax/PKGBUILD.vim core/pacman 4.2.1-4 usr/share/vim/vimfiles/syntax/PKGBUILD.vim % pacman -F PKGBUILD.vim core/pacman 4.2.1-4 usr/share/vim/vimfiles/syntax/PKGBUILD.vim 2) pacman -Fo shouldn't need to exist As demonstrated with pkgfile one can supply a path and get the owner without needing a separate option to search for paths. % pacman -F /usr/share/vim/vimfiles/syntax/PKGBUILD.vim core/pacman 4.2.1-4 usr/share/vim/vimfiles/syntax/PKGBUILD.vim 3) pacman -Fs should mimic pkgfile -r and -x shouldn't exist % pkgfile -r 'PKG.*BUILD\.vim' core/pacman % pacman -Fs 'PKG.*BUILD\.vim' core/pacman 4.2.1-4 usr/share/vim/vimfiles/syntax/PKGBUILD.vim |
This task depends upon
Closed by Allan McRae (Allan)
Tuesday, 05 November 2019, 05:03 GMT
Reason for closing: Fixed
Additional comments about closing: Implemented in pacman-5.2. Any further suggestions should get a fresh bug report.
Tuesday, 05 November 2019, 05:03 GMT
Reason for closing: Fixed
Additional comments about closing: Implemented in pacman-5.2. Any further suggestions should get a fresh bug report.
When running pacman -Fy there is no indication given to what kind of database is being downloaded and looks identical to pacman -Sy. Would it make sense to change the message pacman prints to indicate that it's downloading file lists and not package databases?
Right now it can cause confusion especially given Arch Linux's policy to not support partial upgrades where pacman -Sy with -u is considered poor form.
Either this or combine pacman -Syu and pacman -Fy to download both at the same time keeping both the package databases and file lists synchronised.
pacman -Fs non-existent doesn't return a non-zero exit value while pkgfile does.
% pacman -Fs non-existent
%
% pkgfile -s non-existent
zsh: exit 1 pkgfile -s non-existent
%
However this is mostly besides the point and was only a tangential thought.
Now -F, like -Q, and -S, and -T, and -R, takes an exact input which is also good.
But why was -Fs removed? That provided symmetry with query-like operations such as -Qs and -Ss, both of which support regex. The decision to retain -x instead of repurposing -s seems like an unnecessary break in convention.
A major problem that still remains is that passing a file which doesn't exist in the files databases still doesn't return non-zero. Is this by design such that an empty return is used to indicate non-match while exit statuses are employed for more serious errors/exceptions?