xbps icon indicating copy to clipboard operation
xbps copied to clipboard

`xbps-query`: Add more fine-grained selectors for listing packages

Open camoz opened this issue 4 years ago • 0 comments

It would be nice to be able to ask xbps-query to only list packages in a certain state, like "is a dep" (the invert of -m) or "is half-removed". For half-removed one could xbps-query -l | grep -e '^hr', but this would not work for selecting dependencies, since there currently is no "state descriptor" for that (I mean like ii).

While selecting e.g. only dependencies may not seem directly useful at first, there will always be corner-cases where such an option will be useful, and I think a great package manager like xbps should support that. To support this, maybe it would be best if xbps-query had a more generic interface, where you could combine several MODES together (or rather, split out some flags which are currently MODES and call them SELECTORS, and then allow them to be combined arbitrarily). Right now the modes for xbps-query are mutually exclusive.

PS: In case this is a welcome addition to xbps-query I'm happy to work on this, but it will take me some time since I'm currently quite busy, and I'm not familiar with the xbps codebase yet.

camoz avatar Dec 30 '21 19:12 camoz