Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 796959 - portage 3.0.20-r4, EAPI=8: RESTRICT="!test? ( test )" doesn't work correctly when defined in eclass
Summary: portage 3.0.20-r4, EAPI=8: RESTRICT="!test? ( test )" doesn't work correctly ...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 785484
  Show dependency tree
 
Reported: 2021-06-20 16:46 UTC by Andreas K. Hüttel
Modified: 2021-06-21 03:35 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas K. Hüttel archtester gentoo-dev 2021-06-20 16:46:44 UTC
If for EAPI=8

RESTRICT="!test? ( test )" 

is defined in an eclass, the test phase is never executed when running

ebuild ... test

(irrespective of features or useflag settings).

Test case: Uncomment this line
https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/perl-module.eclass#n146
and try to test an EAPI=8 ebuild, e.g., 
dev-perl/Inline-Files/Inline-Files-0.710.0.ebuild
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-06-20 17:48:28 UTC
I can't reproduce, with various combinations of RESTRICT in eclass and/or ebuild.  Are you sure that you have FEATURES=test and USE=test enabled?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-06-20 19:42:45 UTC
(In reply to Michał Górny from comment #1)
> I can't reproduce, with various combinations of RESTRICT in eclass and/or
> ebuild.  Are you sure that you have FEATURES=test and USE=test enabled?

Scratch that.  I've unmasked the wrong RESTRICT in eclass.

I can reproduce now, and I'll investigate.  My rough guess is that unprocessed RESTRICT is leaking somewhere and confusing Portage.
Comment 3 Larry the Git Cow gentoo-dev 2021-06-20 20:21:33 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=c8a52e17017058394ea35394ebfae0e049c8779c

commit c8a52e17017058394ea35394ebfae0e049c8779c
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2021-06-20 19:48:43 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2021-06-20 20:21:29 +0000

    Fix exposing evaluated PROPERTIES & RESTRICT in EAPI 8
    
    Reorder the code to prevent eclass PROPERTIES & RESTRICT logic from
    overriding the processed values gotten from PORTAGE_PROPERTIES
    and PORTAGE_RESTRICT.  Otherwise, code in Portage misbehaves due to
    unexpected USE-conditionals in PROPERTIES/RESTRICT.
    
    Bug: https://bugs.gentoo.org/796959
    Reviewed-by: Zac Medico <zmedico@gentoo.org>
    Closes: https://github.com/gentoo/portage/pull/733
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 bin/ebuild.sh | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
Comment 4 Larry the Git Cow gentoo-dev 2021-06-20 20:38:16 UTC
The bug has been referenced in the following commit(s):

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

commit e1e6bd8f4d3c26dc5dfdc10189b45a454565443b
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2021-06-20 20:36:51 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2021-06-20 20:38:05 +0000

    perl-module.eclass: Simplify code and reapply EAPI=8 RESTRICT
    
    Bug: https://bugs.gentoo.org/796959
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 eclass/perl-module.eclass | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2021-06-21 03:35:43 UTC
The bug has been closed via the following commit(s):

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

commit 5ace8dcb975be031b52bcea11d329591d6908697
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2021-06-21 03:26:53 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2021-06-21 03:33:21 +0000

    sys-apps/portage: sys-apps/portage: 3.0.20-r6 revbump for EAPI 8 #796959
    
     #796959 Fix exposing evaluated PROPERTIES & RESTRICT in EAPI 8
    
    Closes: https://bugs.gentoo.org/796959
    Bug: https://bugs.gentoo.org/785484
    Package-Manager: Portage-3.0.20, Repoman-3.0.3
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/Manifest                                           | 1 +
 .../portage/{portage-3.0.20-r5.ebuild => portage-3.0.20-r6.ebuild}  | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)