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

Bug 472294

Summary: Add a repoman check for packages missing PYTHON_REQUIRED_USE
Product: Portage Development Reporter: Pacho Ramos <pacho>
Component: RepomanAssignee: Portage team <dev-portage>
Status: RESOLVED DUPLICATE    
Severity: enhancement CC: kensington, python
Priority: Normal Keywords: NeedPatch
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Pacho Ramos gentoo-dev 2013-06-04 15:06:14 UTC
Looks like all packages using new python*-r1 eclasses need to have PYTHON_REQUIRED_USE set, I think would be interesting to get warnings when ebuild is completely missing a PYTHON_REQUIRED_USE reference

Thanks

Reproducible: Always
Comment 1 Mike Gilbert gentoo-dev 2013-06-04 15:38:25 UTC
I'm not quite sure what that check would look like.

Also, it is possible for the ebuild developer to come up with his own REQUIRED_USE constraint which would serve the same purpose.

Does repoman have access to the resulting value in REQUIRED_USE? It may be better to check for python_targets_* than PYTHON_REQUIRED_USE specifically.
Comment 2 Zac Medico gentoo-dev 2013-06-04 21:44:27 UTC
(In reply to Mike Gilbert from comment #1)
> I'm not quite sure what that check would look like.

Me neither. Patches welcome. :)

> Also, it is possible for the ebuild developer to come up with his own
> REQUIRED_USE constraint which would serve the same purpose.
> 
> Does repoman have access to the resulting value in REQUIRED_USE?

Yes, REQUIRED_USE is part of one of the cached metadata variables (like IUSE, *DEPEND, and stuff).
Comment 3 Pacho Ramos gentoo-dev 2014-09-01 11:07:06 UTC
And, what about checking for that variable in eclass? That way, if PYTHON_REQUIRED_USE is not being exported, eclass could show a warning :/
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-09-01 11:58:35 UTC
You can't reference REQUIRED_USE in eclass safely.

However, we could do a simple repoman check that would scan REQUIRED_USE for anything python_targets*. That should be good enough IMO.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-28 15:04:46 UTC
Moving to the new bug where more discussion happened.

*** This bug has been marked as a duplicate of bug 530092 ***