Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 731122 - app-portage/portage-utils-0.88: qlop -r does not print ETA when probing proc
Summary: app-portage/portage-utils-0.88: qlop -r does not print ETA when probing proc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-07-06 20:22 UTC by JayKim
Modified: 2020-10-04 20:14 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to disregard version matching (qlop.c.patch,360 bytes, patch)
2020-07-06 20:24 UTC, JayKim
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description JayKim 2020-07-06 20:22:20 UTC
It seems that the proc probe method of discovering current emerges breaks ETA calculations. When running as non-root or using the -rr flag (change runningmode) the ETA is empty _except_ if the same exact version was already emerged.

Ex (disregard the one anomaly):
# qlop -rtv
2020-07-06T11:56:24 >>> app-office/libreoffice-6.4.5.2: 1:59:11... (81 of 91) ETA: unknown

# qlop -rrtv
qlop: running without /proc scanning, heuristics only
2020-07-06T11:56:24 >>> app-office/libreoffice-6.4.5.2: 1:59:15... (81 of 91) ETA: 6:47:01 (average run)

# qlop -tv libreoffice
2019-12-13T17:44:39 >>> app-office/libreoffice-6.3.3.2: 1:49:31
2019-12-15T05:23:45 >>> app-office/libreoffice-6.3.3.2: 1:48:27
2020-01-02T10:52:48 >>> app-office/libreoffice-6.3.4.2: 2:34:17
2020-02-14T14:11:29 >>> app-office/libreoffice-6.3.4.2-r1: 92:15:46
2020-03-02T10:45:26 >>> app-office/libreoffice-6.3.5.2: 3:07:25
2020-03-17T01:10:32 >>> app-office/libreoffice-6.3.5.2: 1:49:48
2020-03-20T16:25:32 >>> app-office/libreoffice-6.4.2.2: 3:39:16
2020-03-30T16:07:06 >>> app-office/libreoffice-6.4.2.2: 2:14:05
2020-04-17T13:09:38 >>> app-office/libreoffice-6.4.3.2: 4:06:40
2020-04-23T16:14:08 >>> app-office/libreoffice-6.4.3.2: 1:52:41
2020-04-29T20:45:42 >>> app-office/libreoffice-6.4.3.2: 1:47:23
2020-04-30T17:36:15 >>> app-office/libreoffice-6.4.3.2: 1:53:26
2020-05-11T14:58:12 >>> app-office/libreoffice-6.4.3.2: 1:53:29
2020-05-22T14:47:07 >>> app-office/libreoffice-6.4.4.2: 1:55:42
2020-07-06T11:56:24 >>> app-office/libreoffice-6.4.5.2: 2:10:45

I took a quick look at the code, I _think_ this is because the probe_proc function discovers the exact atom, including version. Later, when checking to see if a merge should be counted, only exact version matches are grabbed.

I tweaked one line ("== EQUAL" -> "!= NOT_EQUAL") and that seems to have the (hopefully desired) effect of grabbing all atoms even if they are newer/older.  I have not tested this much for other scenarios, not sure if it breaks anything.

Reproducible: Always

Steps to Reproduce:
1.Run "qlop -r" as root
2.
3.
Actual Results:  
Displays running merges with "ETA: unknown"

Expected Results:  
Calculated ETA
Comment 1 JayKim 2020-07-06 20:24:12 UTC
Created attachment 648058 [details, diff]
Patch to disregard version matching

Uploading trivial patch which fixes the issue for me. Not sure what other side effects it may have.
Comment 2 Fabian Groffen gentoo-dev 2020-10-04 10:37:04 UTC
Hi, this patch is not going to work correctly, unfortunately.  To ignore the version component, it needs to be stripped.
Comment 3 Fabian Groffen gentoo-dev 2020-10-04 10:52:17 UTC
I believe the real problem is that -v triggers "specific" mode, which looks for the exact same version, whereas without -v it takes the package.  For -r this probably doesn't make much sense, and I should drop it.
Comment 4 Larry the Git Cow gentoo-dev 2020-10-04 11:09:43 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=a1e44dbf5cec055ce0300249d6d14c58f961062f

commit a1e44dbf5cec055ce0300249d6d14c58f961062f
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2020-10-04 11:08:57 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2020-10-04 11:08:57 +0000

    qlop: ensure running merges are calculated of off package names #731122
    
    Bug: https://bugs.gentoo.org/731122
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 qlop.c | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 5 Larry the Git Cow gentoo-dev 2020-10-04 18:44:27 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=e2cb3938176e97b6e41d1873838db35a017cf7d9

commit e2cb3938176e97b6e41d1873838db35a017cf7d9
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2020-10-04 18:43:17 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2020-10-04 18:43:17 +0000

    qlop: fix fix for #731122, also make it work without packages specified
    
    Bug: https://bugs.gentoo.org/745798
    Bug: https://bugs.gentoo.org/731122
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 qlop.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
Comment 6 Larry the Git Cow gentoo-dev 2020-10-04 20:14:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1278e75ff758df9e3a7f11d57d36dc378461fe2e

commit 1278e75ff758df9e3a7f11d57d36dc378461fe2e
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2020-10-04 20:14:05 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2020-10-04 20:14:05 +0000

    app-portage/portage-utils-0.90: version bump for qlop fixes
    
    Closes: https://bugs.gentoo.org/745798
    Closes: https://bugs.gentoo.org/731122
    Closes: https://bugs.gentoo.org/713536
    Closes: https://bugs.gentoo.org/705748
    Closes: https://bugs.gentoo.org/701968
    Package-Manager: Portage-3.0.4, Repoman-3.0.1
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 app-portage/portage-utils/Manifest                         |  2 +-
 ...portage-utils-0.88.ebuild => portage-utils-0.90.ebuild} | 14 --------------
 2 files changed, 1 insertion(+), 15 deletions(-)