aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* set: ensure NULL is empty behaviour is retained throughoutFabian Groffen2023-02-071-3/+3
| | | | | | | | Not all set functions respected NULL is empty behaviour, changed add_set_value signature to return a set instead so it can conform. Bug: https://bugs.gentoo.org/893424 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qkeyword: add -A option to show the current archFabian Groffen2022-12-151-12/+19
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qkeyword: gracefully handle case with no found archesFabian Groffen2022-12-151-1/+7
| | | | | Bug: https://bugs.gentoo.org/885801 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qkeyword: take advantage of new atom_explode_catFabian Groffen2021-02-171-5/+2
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qkeyword: fix Coverity 206543 Sizeof not portableFabian Groffen2020-01-191-1/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qkeyword: avoid NULL derefence if strtok_r's initial call returns NULLFabian Groffen2020-01-041-3/+3
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qkeyword/qlist: replace strtok by strtok_rFabian Groffen2020-01-041-3/+5
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qkeyword: pass atom restriction (-p/-c) down to tree_foreach_pkgFabian Groffen2020-01-021-1/+2
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/tree: have tree_foreach_pkg take a query atomFabian Groffen2020-01-021-2/+2
| | | | | | | | | | Allow to reduce the search by having a query atom. This will skip categories and packages not matching the atom, possibly avoiding lots of work. This needs to be exploited from applets where necessary. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/tree: introduce a wrapper for retrieving ebuild metadataFabian Groffen2019-12-301-5/+1
| | | | | | | | | | To further hide the difference between trees, add a wrapper around tree_get_meta, which deals with the underlying storage format. This is most notably useful when dealing with vdb-based and binpkgs because they have a specific or more expensive way of retrieval. This can now properly be hidden from the q applets. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qkeyword: apply profile masks to -S/-T resultsFabian Groffen2019-12-271-14/+59
| | | | | | | Technically, this should be enough to implement the Puppet provider for Gentoo. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qkeyword: add modes to list just list latest stable/testingFabian Groffen2019-12-141-19/+65
| | | | | | | This functionality combined with -F allows usage with e.g. Puppet providers. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qkeyword: sort keywordsFabian Groffen2019-12-141-0/+26
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qkeyword: default to ARCH when no arch givenFabian Groffen2019-12-141-4/+4
| | | | | | | By default just operate on the arch specified by the selected profile. This is probably going to be useful in the majority of the cases. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/set: drop rmspace for all inputsv0.80_pre20190620Fabian Groffen2019-06-191-3/+4
| | | | | | | | Most of the times, rmspace is unnecessary, and doing so, requires a mutable copy of the data. If the callers call rmspace when necessary, set can be a bit more efficient. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qkeyword: optimise away redundant atom_explode callsFabian Groffen2019-05-101-42/+5
| | | | | | | | | With some help from libq/tree now doing the sorting right (and contructing an atom exactly once for each package) we can avoid exploding atoms and greatly benefit in performance. On my setup I've seen timings half or even more. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/tree: merge vdb and cacheFabian Groffen2019-05-091-19/+24
| | | | | | | | since cache was basically a shadow of vdb, and vdb grew too many non-vdb-like behaviour, renamed to tree such that further features only have to be implemented once Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qkeyword: correctly handle missing metadata.xml or email fieldsFabian Groffen2019-05-061-0/+7
| | | | | | | | - if metadata.xml is absent, don't crash - if metadata.xml didn't contain an email, don't match as result Bug: https://bugs.gentoo.org/685132 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qkeyword: add --matchmaint/-m flag, bug #685052Fabian Groffen2019-05-051-1/+20
| | | | | | | | Add option to match against maintainer email address listed in package metadata.xml. Closes: https://bugs.gentoo.org/685052 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qkeyword: use combined set of arches found on all overlaysFabian Groffen2019-05-041-3/+3
| | | | | Bug: https://bugs.gentoo.org/684252 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qkeyword: don't crash while processing an empty setFabian Groffen2019-05-041-0/+6
| | | | | | | using -p/-c one can restrict to a possibly empty set, just bail on that, don't crash Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qcache: rename to qkeywordFabian Groffen2019-05-021-0/+820
qcache has its roots in reading the metadata cache, but since this is standard functionality provided by libq/cache now, all that qcache does really is things with keywords. Signed-off-by: Fabian Groffen <grobian@gentoo.org>