xbps
xbps copied to clipboard
xbps-query -Rl not documented clearly
xbps-query(1)
MODE
Only one of the following modes can be used at a time. By default and
unless the -R option is specified, the target PKG will be queried in the
root directory, otherwise it will be queried in registered repositories.
-l, --list-pkgs
Lists registered packages in the package database (pkgdb). A package
can be in any of the following states:
ii Package is installed.
uu Package is unpacked but must be configured with
xbps-reconfigure(1).
hr Package is half-removed, and can be fully removed with
xbps-remove(1).
?? Package state is unknown.
This sounds to me like I am allowed to use -Rl to get a list of all packages in registered repositories, but -Rl ignores the -R and its output is the same like -l alone. Other flags in the MODE section have this issue too, but it's more obvious there.
The documentation should be improved and @ericonr suggested on IRC that -R and -l (and similar flags) should be conflicting.
https://github.com/void-linux/xbps/pull/430 not initially intended to do that, solves the issues reported here.
Mainly, introduces checks for compatibility with REPO-R mode, enforces no-conflicts in MODE flags and tries to improve the man page.