Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 583770 - repoman: report IUSE.invalid values that match USE_EXPAND but are not described in *.desc
Summary: repoman: report IUSE.invalid values that match USE_EXPAND but are not describ...
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-22 09:58 UTC by Michał Górny
Modified: 2022-07-12 03:18 UTC (History)
0 users

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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-05-22 09:58:20 UTC
I think repoman should have a check ensuring that all used USE_EXPAND flags are properly globally described/listed in profiles/desc.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-06-28 10:07:14 UTC
Ping.  This is a real problem, so is there any chance to have this implemented?
Comment 2 Zac Medico gentoo-dev 2019-06-28 17:22:34 UTC
Looking at the code, it seems like this case is already supposed to be handled, otherwise the check for missing local USE descriptions (GLEP 56) would report such flags.
Comment 3 Zac Medico gentoo-dev 2019-06-28 17:43:37 UTC
Repoman grabs the USE_EXPAND descriptions here:

https://gitweb.gentoo.org/proj/portage.git/tree/repoman/lib/repoman/repos.py?h=repoman-2.3.16#n249

If it didn't do that, the corresponding flags would trigger an IUSE.invalid error.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-06-28 19:05:03 UTC
dev-libs/nettle is an example package suffering from this.  Repoman is happy about it.
Comment 5 Zac Medico gentoo-dev 2019-06-28 19:21:00 UTC
(In reply to Michał Górny from comment #4)
> dev-libs/nettle is an example package suffering from this.  Repoman is happy
> about it.

It's happy because cpu_flags_x86_sha is described in dev-libs/nettle/metadata.xml, and cpu_flags_x86_aes is described in profiles/desc/cpu_flags_x86.desc.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-06-28 20:22:50 UTC
(In reply to Zac Medico from comment #5)
> (In reply to Michał Górny from comment #4)
> > dev-libs/nettle is an example package suffering from this.  Repoman is happy
> > about it.
> 
> It's happy because cpu_flags_x86_sha is described in
> dev-libs/nettle/metadata.xml, and cpu_flags_x86_aes is described in
> profiles/desc/cpu_flags_x86.desc.

It shouldn't be because not having it in *.desc violates PMS.
Comment 7 Zac Medico gentoo-dev 2019-06-28 20:44:37 UTC
For the purposes of this check, does PMS define where the list of valid USE_EXPAND prefixes come from? Obviously we could use base/make.defaults, but I don't see anything about that in PMS.
Comment 8 Zac Medico gentoo-dev 2019-06-28 20:52:22 UTC
I guess profiles/desc/*.desc is probably the best source of truth for USE_EXPAND prefixes.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-06-29 06:02:24 UTC
It comes from the currently active profile.  Which means it must be present in all profiles that are applicable to package in question (i.e. filtered by keywords).
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-06-29 06:03:41 UTC
(which means it'd be a good idea to loop over all profiles, and complain if any of them doesn't have the relevant USE_EXPAND, compared to desc/)
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-12 03:18:28 UTC
repoman support has been removed per bug 835013.

Please file a new bug (or, I suppose, reopen this one) if you feel this check is still applicable to pkgcheck and doesn't already exist.