commit:     fc71a04651ab56b0133c61d839169a0cabf6f092
Author:     Jaak Ristioja <jaak <AT> ristioja <DOT> ee>
AuthorDate: Fri Feb 11 15:31:05 2022 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Feb 12 16:14:11 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=fc71a046

qlop: Fixed --running --verbose returning unknown ETA

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 <AT> ristioja.ee>
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 qlop.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/qlop.c b/qlop.c
index b054e58..afa4c19 100644
--- a/qlop.c
+++ b/qlop.c
@@ -797,7 +797,9 @@ static int do_emerge_log(
                                                        || flags->do_running)
                                        {
                                                /* find in list of averages */
-                                               if (flags->do_predict || 
verbose) {
+                                               if (flags->do_predict ||
+                                                       (verbose && 
!flags->do_running))
+                                               {
                                                        snprintf(afmt, 
sizeof(afmt), "%s/%s",
                                                                        
pkgw->atom->CATEGORY, pkgw->atom->PF);
                                                } else {
@@ -940,7 +942,9 @@ static int do_emerge_log(
                                                        || flags->do_running)
                                        {
                                                /* find in list of averages */
-                                               if (flags->do_predict || 
verbose) {
+                                               if (flags->do_predict ||
+                                                       (verbose && 
!flags->do_running))
+                                               {
                                                        snprintf(afmt, 
sizeof(afmt), "%s/%s",
                                                                        
pkgw->atom->CATEGORY, pkgw->atom->PF);
                                                } else {

Reply via email to