1 |
commit: de23ef44734dd428fd6de70d2d2d6d40b7768fff |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 21 20:16:46 2019 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 21 20:16:46 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=de23ef44 |
7 |
|
8 |
qlop: fix last merge timeframe detection |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
|
12 |
qlop.c | 7 ++++--- |
13 |
1 file changed, 4 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/qlop.c b/qlop.c |
16 |
index 63a40a8..fcaf973 100644 |
17 |
--- a/qlop.c |
18 |
+++ b/qlop.c |
19 |
@@ -373,6 +373,8 @@ static int do_emerge_log( |
20 |
|
21 |
all_atoms = array_cnt(atoms) == 0; |
22 |
if (all_atoms || flags->show_lastmerge) { |
23 |
+ atomset = create_set(); |
24 |
+ |
25 |
/* assemble list of atoms */ |
26 |
while (fgets(buf, sizeof(buf), fp) != NULL) { |
27 |
if ((p = strchr(buf, ':')) == NULL) |
28 |
@@ -422,9 +424,6 @@ static int do_emerge_log( |
29 |
atom->PR_int = 0; |
30 |
snprintf(afmt, sizeof(afmt), "%s/%s", atom->CATEGORY, atom->PN); |
31 |
|
32 |
- if (atomset == NULL) |
33 |
- atomset = create_set(); |
34 |
- |
35 |
/* now we found a package, register this merge as a |
36 |
* "valid" one, such that dummy emerge calls (e.g. |
37 |
* emerge -pv foo) are ignored */ |
38 |
@@ -435,7 +434,9 @@ static int do_emerge_log( |
39 |
array_for_each(&vals, i, atomw) |
40 |
atom_implode(atomw); |
41 |
xarrayfree_int(&vals); |
42 |
+ |
43 |
clear_set(atomset); |
44 |
+ last_merge = tstart_emerge; |
45 |
} |
46 |
|
47 |
atomw = add_set_value(afmt, atom, atomset); |