xbps icon indicating copy to clipboard operation
xbps copied to clipboard

xbps-query -Rl not documented clearly

Open paper42 opened this issue 4 years ago • 1 comments

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.

paper42 avatar Mar 21 '21 23:03 paper42

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.

dmarto avatar Mar 09 '22 01:03 dmarto