| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I noticed that the qlist(1) man page did not mention that -S implies -I,
so I wanted to fix that.
The man page was actually supposed to mention it, but
man/include/qlist.optdesc.yaml was incorrectly using the "slot" key to
define --slots's long description, so the man page ended up using the
short description from q list --help instead of the longer description
that contains "This flag implies -I.".
Renaming the key in the yaml file from "slot" to "slots" fixed the
problem.
I have regenerated the man pages with man/mkman.py, but only included
the new version of qlist.1 in this commit.
Signed-off-by: Emanuele Torre <torreemanuele6@gmail.com>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
Need to handle --root before we read profiles, -q to silence warnings
from that profile reading.
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
`s[len - 1]` is not allowed for strings whose length is 0.
Caught by clang's UBSAN.
PR: https://github.com/gentoo/portage-utils/pull/28
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Empty strings, or those being just whitespace were not handled
correctly. Thanks bstaletic in PR #19 for pointing this out. Avoid
running under the original string pointer and skip any checks for
strings that are too short to match anything in particular. This sweeps
an edgecase of just a single whitespace char under the carpet -- which
is just about fine, for it needs not to be handled for any legitimate
case.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Previously, `values_set(merge_averages, avgs)` would allocate `avgs`,
then it would be used in `array_for_each(atoms, i, atom)`, but a call to
`xarrayfree_int(avgs)` was missing after the loop.
Hopefully, this, along with #26, will solve the issues from #19.
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>
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
use mkdir_p to avoid Unchecked return value from library
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
| |
Handle case where image dir somehow could not be opened.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
This means, we can always build qtegrity, because we have the required
hash impls on board through gnulib.
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>
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/916949
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/921132
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PMS specifically calls out that ewarn should not display its message
to stdout. Portage sends all e{log,info,warn,...} to stderr. Imitate
that.
This discrepancy causes problems for ghc-package.eclass users, for one,
as there are instances where that class purposely dumps a warning and
then expects its callers to still use its stdout as a result.
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Mike Frysinger <vapier@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
| |
For as long as we will pre-load all profile information at every q
invocation, respect -q flag so warnings in that code can be suppressed.
Bug: https://bugs.gentoo.org/735134
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
profile init code may use warn etc so ensure we have colours defined and
quiet setup via fallback
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/735134
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
| |
NO_COLOR apparently is the more standard version of NOCOLOR.
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>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/892533
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>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/885801
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
Empty repo name is documented in portage(5).
Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
If repo name in the parent line was empty, nothing was printed.
Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|