Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 907896

Summary: app-eselect/eselect-ruby-20221225 calls portageq directly (seen with dev-lang/ruby-3.2.2-r2)
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Gentoo Ruby Team <ruby>
Status: RESOLVED FIXED    
Severity: normal CC: eselect, sam
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 906129    
Attachments: build.log
ruby.eselect: Call envvar from eselect's package manager lib instead of portageq
ruby.eselect: Call create_man_links unconditionally

Description Agostino Sarubbo gentoo-dev 2023-06-05 13:18:28 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-lang/ruby-3.2.2-r2 uses portageq in ebuild scope.
Discovered on: amd64 (internal ref: ci)
Comment 1 Agostino Sarubbo gentoo-dev 2023-06-05 13:18:30 UTC
Created attachment 863331 [details]
build.log

build log and emerge --info
Comment 2 Ulrich Müller gentoo-dev 2023-06-05 16:14:40 UTC
portageq is called indirectly via ruby.eselect:

    [[ $(portageq envvar FEATURES) =~ noman ]] || create_man_links ${version}

The module should do something like this instead, using eselect's envvar function:

    inherit package-manager
    ...
    [[ $(envvar dev-lang/ruby FEATURES) =~ noman ]] || ...
Comment 3 Ulrich Müller gentoo-dev 2023-06-06 19:38:12 UTC
*** Bug 907897 has been marked as a duplicate of this bug. ***
Comment 4 Ulrich Müller gentoo-dev 2023-06-06 19:41:43 UTC
Created attachment 863426 [details, diff]
ruby.eselect: Call envvar from eselect's package manager lib instead of portageq

Attached patch should fix it. I have tested it without and with "noman" in FEATURES, and it seems to work as intended (i.e. creating or not creating the ruby.1 redirect page).

Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Comment 5 Ulrich Müller gentoo-dev 2023-06-08 07:19:42 UTC
Created attachment 863530 [details, diff]
ruby.eselect: Call create_man_links unconditionally

Thinking about it, checking FEATURES=noman isn't even necessary, because create_man_links() will do nothing when the target man page doesn't exist. The empty loop will still be much faster than calling portageq.

Updated patch attached (this time, properly formatted for proj/ruby-scripts.git).
Comment 6 Larry the Git Cow gentoo-dev 2023-06-16 07:52:43 UTC
The bug has been closed via the following commit(s):

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

commit bbe1d7659a532854096624d4e2a529f47db5c7b9
Author:     Hans de Graaff <graaff@gentoo.org>
AuthorDate: 2023-06-16 07:52:06 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2023-06-16 07:52:15 +0000

    app-eselect/eselect-ruby: add 20230616
    
    Fixes: https://bugs.gentoo.org/908052
    Fixes: https://bugs.gentoo.org/907896
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 app-eselect/eselect-ruby/Manifest                  |  1 +
 .../eselect-ruby/eselect-ruby-20230616.ebuild      | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+)