| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
%s isn't a valid modifier in POSIX for strptime, so parse the number
manually and produce a time out of that.
Bug: https://bugs.gentoo.org/833942
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
atom->pfx_op cannot be 2 values at the same time so,
pfx_op != X || pfx_op != Y
has to be always true
fix it to turn into and condition, which makes more sense in the code
flow
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
It seems that this was broken during the introduction of --predict in commit
13402fbd8c51f7feedcc85f2f0815768ec45ee7a which caused keys of the merge_averages
and unmerge_averages sets to include version information, whereas --running
expects these not to include version information.
Bug: https://bugs.gentoo.org/807975
Signed-off-by: Jaak Ristioja <jaak@ristioja.ee>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
start_time was changed to default to -1 at some point, which broke
qlop's default to list the last merge.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
| |
Regression since v0.92.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
atom_compare_flg allows to give match behaviour flags, such that often
used exceptions can now be handled without having to modify the input
atoms.
atom_compare is now a macro calling atom_compare_flg with
flags=ATOM_COMP_DEFAULT.
Updated all callers that can use this feature.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
Predict should be a better estimator than average, and become the new
source for estimating remaining times (with -r).
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
Allow setting the zero date, to basically have a quick way to list
everything, useful with -E, e.g. -Evd 0 to show the entire emerge
history.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
It seems that exiting doesn't always come immediately (= the same
second) after terminating, so allow a small window (4s) for these to
come in sequence to treat them as a single termination.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/745798
Bug: https://bugs.gentoo.org/731122
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
It seems Portage is very inconsistent sometimes terminating, sometimes
exiting, most of the time exiting and terminating. Deal with it.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
Because sandbox doesn't seem as dead as it was pronounced a while ago,
bring back support in qlop, since it is the easiest way to detect
running merges without any special privileges necessary.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/745798
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/731122
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
Check/search once for colons, it is a bit brittle to assume a colon was
found, even though in this case it should have always succeeded.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/711896
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
introduced in 20844dc943700cca72bbb6896f42adcd30de41e3, the intention
was to suppress the warning, not raise it.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Really complete the --emerge option with --verbose to get:
% qlop -Ev
emerge -uaD @world
U sys-kernel/linux-firmware-20200421 [20200316]
N www-servers/nginx-1.18.0
D www-servers/nginx-1.17.10
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Packages unmerged (e.g. emerge -c) or unmerged in a blocker situation
showed up in -E mode in the normal way, e.g.:
2020-04-30T20:03:51 <<< www-servers/nginx-1.17.10
Make it show like in pseudo emerge output:
D www-servers/nginx-1.17.10
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
| |
While -E defaults to -l (last merge), silently drop it when -d is used.
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>
|
|
|
|
|
|
|
| |
basically try saying something useful, instead of unknown
Bug: https://bugs.gentoo.org/701386
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
- warn when qlop needs to defer to log heuristics (#701968)
- print running packages most recent first
- suppress identical running packages (#701392)
- ignore batches in emerge.log that appear to be backwards in time
Bug: https://bugs.gentoo.org/701968
Bug: https://bugs.gentoo.org/701392
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
mainly memory and socket leaks, sometimes using invalid data, this is
related to bug #701402
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
when the calculated seconds are negative, we probably had a corrupt log,
so just garbage in/garbage out without trying to interpret it or
something
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
bogus input can result in NULL, crashing strftime
Thanks Agostino Sarubbo
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
| |
Thanks Agostino Sarubbo for reporting
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
Adapt test to use -rr to force falling back to scanning emerge.log, and
give -d to the data range in which things happen, such that the 10-day
cutoff can be calculated based on that for deterministic output.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Probe /proc filesystem for running merges, and use the atoms found there
to select the packages to list. In addition, prune any operations that
started > 10 days ago so there will be some sort of convergence.
Bug: https://bugs.gentoo.org/698196
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
Stop seeing finishing emerge processes double, thereby wrongly
calculating the current parallel merges.
Bug: https://bugs.gentoo.org/697068
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
sort the package lists using atom order for some consistency after set
usage
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
Bring down runtime for -a or -f (without atoms) from ~4s to ~0.6s.
Bug: https://bugs.gentoo.org/694972
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example, the output could be like this, showing upgrade information:
% ./qlop -E -t
U app-shells/bash-5.0_p11 [5.0_p9-r0]: 2′38″
U app-admin/eselect-1.4.15 [1.4.14-r0]: 19s
U sys-libs/talloc-2.3.0 [2.2.0-r0]: 1′56″
U app-portage/prefix-toolkit-5 [4-r0]: 10s
U dev-python/cryptography-2.7 [2.6.1-r0]: 1′59″
U net-dns/bind-tools-9.14.5 [9.14.4-r0]: 4′17″
R dev-python/sphinxcontrib-applehelp-1.0.1: 28s
R dev-python/sphinxcontrib-devhelp-1.0.1: 27s
R dev-python/sphinxcontrib-jsmath-1.0.1: 25s
R dev-python/sphinxcontrib-htmlhelp-1.0.2: 28s
R dev-python/sphinxcontrib-serializinghtml-1.1.3: 28s
R dev-python/sphinxcontrib-qthelp-1.0.2: 28s
U dev-python/sphinx-2.0.1 [1.7.5-r1]: 1′13″
U net-mail/notmuch-0.29.1-r1 [0.28.4-r0]: 1′00″
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
| |
doing something like emerge -pv blah will generate a run where nothing
is merged or unmerged, so ignore it.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
| |
Respect ROOT when set, to ease scripting of qlop interaction with
chroots.
Bug: https://bugs.gentoo.org/692224
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Fix elapsed time mode (-t) when using -r displaying the elapsed time
also as the ETA. When using -v, display what ETA is being used (average
or longest run).
Also, better document which flags can be combined with -r.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
The default portage provider in Puppet uses qatom in a rather clumpsy
way. The newer formatting broke it because they don't use explicit
formatting. Make atom_format somewhat smarter to unbreak Puppet's
usage.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
| |
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|