| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
This looked very rudimentary, and half, there were no translations, and
not all strings were covered. It was never enabled, so dummy for many
releases.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some invocations of `q` may try to call `xarraysort(NULL, 0)`.
One example is `qlop -a foo` where `foo` was never unmerged.
Instead of requiring every call of `xarraysort()` to take care of `NULL`
arguments, `xarraysort()` now exits early if `arr->eles == NULL`.
Closes: https://github.com/gentoo/portage-utils/pull/28
Signed-off-by: Boris Staletic <boris.staletic@protonmail.com>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`qsort` passes pointers to elements ("iterators" in C++ lingo) to the
callback, not elements directly.
Hence `l` and `r` in `atom_compar_cb` actually receives `depend_atom**`,
but only when called from `qsort`. The other two call sites
(`tree_pkg_compar` and `pkg_sort_cb`) actually apssed `depend_atom*`.
This leads to type casting confusion and undefined behaviour for any
invocation of `qlop -p`.
First discovered by SEGFAULT-ing with the following invocation:
qlop -p `cat /var/lib/portage/world`
Valgrind and ASAN made triggering the SEGFAULT easier - any invocation
with two or more atoms triggered a NULL dereference.
This commit addresses the above problem:
1. Expect that `atom_compar_cb` is actually called with two
`depend_atom**`.
2. Make `tree_pkg_compar` and `pkg_sort_cb` comply with the above
change, by passing `&al` and `&ar`, instead of `al` and `ar`.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
When we cannot read all bytes from a file, return an empty string, not
partial garbage.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
len represents the entire string length, but we start scanning after the
line identifier, so substract that size from len, such that we don't
start scanning after the end of the input string.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
This seems necessary for PR #21, but keep the original code structure
largely in-tact.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Alternative to the implementation in PR #21, so as to reuse the same
hashing code.
We could add the interface to compute multiple hashes from the same
string when that's actually necessary.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
qlop SEGFAULTed when predict on a package without category was called
Closes: https://github.com/gentoo/portage-utils/pull/24
Signed-off-by: Pavel Kalugin <pavel@pavelthebest.me>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
OpenSSL deprecated most (if not all) of the hashes we use from it, and
we don't have our own implementations for e.g. SHA512, so switch to
gnulib's versions, which makes this all simpler.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
Now add_set_value can allocate a new set, Coverity thinks this will
actually happen, despite in these cases the input set not being NULL.
Help Coverity by adding a redundant if.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/892533
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
* Libtool was only used for convenience libraries, which can
be done in vanilla Automake. This allows passing `static`
in LDFLAGS.
Bug: https://bugs.gentoo.org/841898
Signed-off-by: David Seifert <soap@gentoo.org>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/852197
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
allow resolving a dep-specification to atoms found in a tree, e.g. see
what would get selected
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Based on the work of genbtc in GitHub PR #16
Add BUILD_ID to atom when parsing and use PATH to get the appropriate
location.
Closes: https://github.com/gentoo/portage-utils/pull/16
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
| |
PR: https://github.com/gentoo/portage-utils/pull/16
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
| |
References: https://github.com/gentoo/portage-utils/pull/16
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
Version comparisons are complex, stick with strict PMS definition for
it, so we produce the same results as Portage.
Bug: https://bugs.gentoo.org/838856
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
condense conditional and use-deps to a single line when there's a single
target, e.g.:
use? ( cat/pkg )
instead of
use? (
cat/pkg
)
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
some weird basename-lgpl problems occur with the newer gnulib snapshot,
so stick with older version for now
Bug: https://bugs.gentoo.org/834136
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/834136
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
Coverity correctly deduced here, that if we used cached stat, we didn't
use the cache, but a bogus memory struct instead. Ensure we always use
a populated stat value.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
tree_read_file_pms was using buf, which was never initialised after
some changes from the past
remove entire buf, and use the paths from pkg and cat ctxs in the
printfs directly
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
doing reallocs possibly (hight probability) invalidates previously
retrieved pointers, which is really nasty to work with, and error prone,
so instead allocate incremental slabs where necessary
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
| |
move suggests the source is gone, so make sure it is :)
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
This code originated from qmerge.c, it was adapted to be more generic in
a function.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
- sendfile() additions to configure.ac
- autoupdate for 2.71
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|