aboutsummaryrefslogtreecommitdiff
path: root/qpkg.c
Commit message (Collapse)AuthorAgeFilesLines
* *: remove WHIRLPOOL hash supportFabian Groffen2024-01-011-1/+1
| | | | | | | WHIRLPOOL has not been in use since mid 2017, and its support is bound to be removed from OpenSSL. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg.c: fix crash on empty PKGDIR, bug #815622Fabian Groffen2021-10-031-0/+2
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: replace allocated buf with stack versionv0.88Fabian Groffen2020-06-281-30/+10
| | | | | | | now we don't use anything that would realloc buf, just stick to a buffer on the stack so we don't have ensure we free it either Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: use tree_pkg_meta_get instead of direct VDB readFabian Groffen2020-06-281-29/+18
| | | | | | | | qpkg failed to create packages from a different ROOT because the CONTENTS from vdb was read without ROOT support. Avoid this by using tree-based functions that properly use ROOT. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: fix VDB access method, warn when atoms didn't match anythingFabian Groffen2020-06-271-18/+35
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: don't fail when pkgdir doesn't exist yetFabian Groffen2020-06-271-3/+3
| | | | | | | When we implicitly created pkgdir, also try to chmod it, instead of failing on permissions later. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/hash: unify hash methods into single approachFabian Groffen2020-05-161-4/+3
| | | | | | | | remove duplicate hashing strategies, use private copies of md5 and sha1 hashes when ssl is not available, else rely on ssl to provide hashing capabilities Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: fix Coverity 207883 Error handling issuesFabian Groffen2020-01-251-1/+2
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: change smiley in comment not to upset rediculous style checkFabian Groffen2020-01-251-1/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: try to fix Coverity 125940 Time of check time of useFabian Groffen2020-01-251-13/+15
| | | | | | | first perform the unlink, then open the object, and perform stat + chmod on it, if necessary Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: try 2 at Coverity 206549 Time of check time of useFabian Groffen2020-01-251-7/+8
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: try to fix Coverity 206549 Time of check, time of useFabian Groffen2020-01-251-4/+11
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: fix syntax errorFabian Groffen2020-01-251-1/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: fix Coverity 125896 Unchecked return valueFabian Groffen2020-01-241-1/+6
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: fix Coverity 125928 Insecure temporary fileFabian Groffen2020-01-221-1/+5
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: fix Coverity 125923 Resource leakFabian Groffen2020-01-221-0/+3
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: fix Coverity 125897 Unchecked return valueFabian Groffen2020-01-221-2/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: fix Coverity 125896 Unchecked return valueFabian Groffen2020-01-221-2/+11
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: fix Coverity 206541 Explicit null dereferenceFabian Groffen2020-01-191-7/+9
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: fix Coverity 206544 Dereference null return valueFabian Groffen2020-01-191-1/+6
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: fix Coverity 206566 Resource leakFabian Groffen2020-01-191-0/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: make use of tree being able to traverse binpkg treesFabian Groffen2020-01-021-103/+69
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qlop: improve description for -c, fix -EFabian Groffen2020-01-021-8/+8
| | | | | | | -c could use a bit better explanation -E included installed packages for no good reason Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* *: use new PF in places were it was simulatedFabian Groffen2020-01-011-9/+4
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: drop misleading and incorrect message about unmatched packagesFabian Groffen2019-11-171-5/+2
| | | | | | | there is no relationship between input arguments and output packages made (e.g. slots, sub-matches, etc.) Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: drop binpkgs in CATEGORY subdir for complianceFabian Groffen2019-11-141-1/+8
| | | | | | | emaint doesn't get a pile of binpkgs, so stash them where it expects them Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: don't emit hypothetical messages when real work has been doneFabian Groffen2019-09-281-3/+5
| | | | | | | | drop the "would be" part of how many bytes were freed when we're not pretending Bug: https://bugs.gentoo.org/695586 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: fix tbz2 xpak generationFabian Groffen2019-09-281-5/+18
| | | | | | | The xpak footer was missing causing files not to contain their metadata (even though present in the file). Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: drop weird location choice for binpkgsFabian Groffen2019-09-261-37/+24
| | | | | | | | If someone wants to put packages in /var/tmp or $HOME, then -P should be used. Ignoring portage-config pkgdir is odd, if one can't write there, -P is there to the rescue. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: use atom_format and tree_get_atom where possibleFabian Groffen2019-07-141-15/+5
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/tree: rename tree_get_vdb_atoms to tree_get_atomsFabian Groffen2019-07-131-19/+9
| | | | | | | | in qmerge take advantage of tree_get_atoms to fold the packages for all trees (overlays) next to vdb contents into one using the same code that builds the vdb list Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/set: drop rmspace for all inputsv0.80_pre20190620Fabian Groffen2019-06-191-4/+2
| | | | | | | | 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>
* libq/tree: merge vdb and cacheFabian Groffen2019-05-091-13/+17
| | | | | | | | 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>
* libq/vdb: drop q_ prefixFabian Groffen2019-05-061-7/+7
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qpkg: use libq/cacheFabian Groffen2019-04-281-34/+19
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* reinitialize_flat: removeFabian Groffen2019-04-251-3/+1
| | | | | | | | | | | remove the flat cache (just a file list of directory contents) - it can easily get stale - traversing a directory isn't that expensive nowadays (and we don't do VAX) the code should switch to using libq/cache instead Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* q: fix various issues on Linux systemsFabian Groffen2019-03-271-2/+2
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* build: compile applets as separate objectsFabian Groffen2019-03-271-31/+63
| | | | | | | | Instead of including everything from a single file, compile each applet separately. This standardises things somewhat, and allows for parallel compilation. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* build: add gnulib sourcesFabian Groffen2019-03-191-0/+2
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq: standardise buildFabian Groffen2019-03-181-1/+1
| | | | | | | | | Compile each C-file by itself, producing an object which is linked into a convenience archive. The q program then links against that archive. Switch to autotools-based build for everyone. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq: introduce set to replace virtuals (queue)Fabian Groffen2019-03-091-28/+30
| | | | | | | | | | | | The virtuals file contained some queue functions which actually were list functions. Replaced this with a proper set, which hash backend to speed up many search operations. Changed throughout the code to use more efficient path. While at it, merge xstrdup wrappers in xmalloc, and use wrappers more consistently. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* fix GCC-8.2 warningsFabian Groffen2019-03-011-9/+20
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* update copyrightsFabian Groffen2018-04-051-1/+1
|
* qpkg: fix leakage when using -P multiple timesMike Frysinger2016-12-281-0/+1
|
* drop _q_static and standardize func prototypes a bitMike Frysinger2016-12-281-14/+12
|
* move system headers to porting.h to avoid duplicationMike Frysinger2016-12-281-2/+0
|
* usage: add an extended text sectionv0.63Mike Frysinger2016-03-271-1/+1
| | | | | | Many applets now are so complicated that a single line of text isn't sufficient to describe all of its capabilities/nuances. Allow them to pass in an arbitrary string of data to contain examples.
* clean up old debug statementsMike Frysinger2015-12-161-2/+0
| | | | | | Much of this debug output has outlived its usefulness now that the code has stabilized. Clean it all up to make the debug builds way less noisy and keep from breaking the tests.
* qpkg: add multiple overlay supportMike Frysinger2015-11-261-1/+8
| | | | | | | This one is easy as it doesn't actually scan portdir and the cache logic is simple & self contained. URL: https://bugs.gentoo.org/553260
* qgrep/qpkg: use the cache file givenMike Frysinger2015-05-191-13/+1
| | | | | The qgrep code needs a rework to avoid chdir assumptions, but that's much larger than fixing the cache file name, so punt for later.