Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 677890 - app-portage/genlop-0.30.10-r1 genlop -c lists all merges twice
Summary: app-portage/genlop-0.30.10-r1 genlop -c lists all merges twice
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on: 685676
Blocks:
  Show dependency tree
 
Reported: 2019-02-13 17:39 UTC by Nowa Ammerlaan
Modified: 2023-07-18 22:09 UTC (History)
9 users (show)

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


Attachments
emerge --info (emerge-info.txt,6.46 KB, text/plain)
2019-02-13 17:39 UTC, Nowa Ammerlaan
Details
simple workaround for duplicate output in genlop (genlop-dedup.patch,301 bytes, patch)
2019-03-19 00:20 UTC, Ed Santiago
Details | Diff
Correctly filter running sandboxes (genlop-0.30.10-sandbox.patch,646 bytes, patch)
2019-05-09 13:26 UTC, Joe Breuer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nowa Ammerlaan gentoo-dev 2019-02-13 17:39:18 UTC
Created attachment 565060 [details]
emerge --info

Genlop -c is showing all merges twice for me:

andrew-gentoo-pc andrew # genlop -c
  Currently merging 21 out of 92
  * sys-kernel/gentoo-sources-4.20.8
    current merge time: 9 seconds.
    ETA: less than a minute.
  Currently merging 21 out of 92
  * sys-kernel/gentoo-sources-4.20.8
    current merge time: 9 seconds.
    ETA: less than a minute.

app-portage/genlop-0.30.10-r1
sys-apps/portage-2.3.60
Comment 1 Seweryn 2019-02-22 21:13:11 UTC
Currently merging 9 out of 11

 * dev-qt/qtquickcontrols2-5.12.1 

       current merge time: 4 minutes and 54 seconds.
       ETA: any time now.

 Currently merging 9 out of 11

 * dev-qt/qtquickcontrols2-5.12.1 

       current merge time: 4 minutes and 55 seconds.
       ETA: any time now.
Comment 2 Frank Krömmelbein 2019-03-12 17:56:36 UTC
I have now the same issue, after todays stable update of sys-apps/portage-2.3.51-r1 to 2.3.62.
https://bugs.gentoo.org/680054
I think it is a regression of portage not a issue of genlop.
Comment 3 Ed Santiago 2019-03-19 00:20:04 UTC
Created attachment 569744 [details, diff]
simple workaround for duplicate output in genlop

The attached patch resolves the issue for me.
Comment 4 Seweryn 2019-03-19 17:52:05 UTC
The attached patch resolves the issue for me.
Comment 5 Herbert Wantesh 2019-03-19 23:28:43 UTC
the patch fixes the bug for me too
Comment 6 Samuel Bernardo 2019-04-07 11:35:53 UTC
The patch also solves the issue of listing all merges twince for me, but I need to keyword unmask 0.30.10-r1 for amd64.

The issue also happens with stabilized genlop-0.30.9-r1 that I was using before. I confirm that the problem starts to happen after last portage upgrade. I'm using portage-2.3.62 stable version for amd64.

Thanks Ed Santiago for sharing the patch.
Comment 7 Joe Breuer 2019-05-09 13:26:09 UTC
Created attachment 575600 [details, diff]
Correctly filter running sandboxes

The underlying cause seems to be that genlop looks for running emerges by filtering over sandbox processes. A change to portage (or something) introduced the pid-ns-init process to the call tree, which is also selected by genlop looking for sandbox processes. This is what causes each emerge to show up twice - once matched on the pid-ns-init process, once on the sandbox process itself.

The attached patch introduces another filter to the ps command used to exclude the pid-ns-init processes. 

This Works Here (TM) to only output each running emerge once, not twice.
Comment 8 Gabriel Linder 2019-05-12 00:00:46 UTC
Was hit by this too. Integrated Joe's patch to a PR, hope it gets merged soon :)

https://github.com/gentoo/gentoo/pull/11975
Comment 9 Zac Medico gentoo-dev 2019-05-12 04:19:27 UTC
(In reply to Joe Breuer from comment #7)
> Created attachment 575600 [details, diff] [details, diff]
> Correctly filter running sandboxes

Updated to combine both grep -v calls into one:

https://github.com/gentoo-perl/genlop/pull/11

(In reply to Gabriel Linder from comment #8)
> Was hit by this too. Integrated Joe's patch to a PR, hope it gets merged
> soon :)
> 
> https://github.com/gentoo/gentoo/pull/11975

I'll go ahead and merge that with the updated patch.
Comment 10 Larry the Git Cow gentoo-dev 2019-05-12 04:39:17 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c64f10f130eca58f5171e9d8b915272638af1ba

commit 3c64f10f130eca58f5171e9d8b915272638af1ba
Author:     Gabriel Linder <linder.gabriel@gmail.com>
AuthorDate: 2019-05-11 23:50:57 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-05-12 04:39:08 +0000

    app-portage/genlop: Correctly filter sandboxes.
    
    Embed the patch provided by Joe Breuer to fix `genlop -c`.
    
    The underlying cause seems to be that genlop looks for running emerges
    by filtering over sandbox processes. A change to portage (or something)
    introduced the pid-ns-init process to the call tree, which is also
    selected by genlop looking for sandbox processes. This is what causes
    each emerge to show up twice - once matched on the pid-ns-init process,
    once on the sandbox process itself.
    
    See https://bugs.gentoo.org/677890#c7 for more details.
    
    Closes: https://github.com/gentoo/gentoo/pull/11975
    Bug: https://bugs.gentoo.org/677890
    Package-Manager: Portage-2.3.62, Repoman-2.3.12
    Signed-off-by: Gabriel Linder <linder.gabriel@gmail.com>
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 .../genlop/files/genlop-0.30.10-sandbox.patch      | 29 +++++++++++++++++++
 app-portage/genlop/genlop-0.30.10-r2.ebuild        | 33 ++++++++++++++++++++++
 2 files changed, 62 insertions(+)
Comment 11 Larry the Git Cow gentoo-dev 2023-07-18 22:09:30 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=784e0cddc47130412c37569deb120e542767f4ca

commit 784e0cddc47130412c37569deb120e542767f4ca
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-07-18 22:06:20 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-07-18 22:09:16 +0000

    app-portage/genlop: add 0.30.11
    
    Closes: https://bugs.gentoo.org/283628
    Closes: https://bugs.gentoo.org/447436
    Closes: https://bugs.gentoo.org/540050
    Closes: https://bugs.gentoo.org/658940
    Closes: https://bugs.gentoo.org/677890
    Closes: https://bugs.gentoo.org/697504
    Signed-off-by: Sam James <sam@gentoo.org>

 app-portage/genlop/Manifest              |  1 +
 app-portage/genlop/genlop-0.30.11.ebuild | 28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)