Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 506172 - dev-util/pkgcheck: check if inherited eclass has banned used EAPI
Summary: dev-util/pkgcheck: check if inherited eclass has banned used EAPI
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PkgCore (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Arthur Zamarin
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 808261
  Show dependency tree
 
Reported: 2014-03-29 17:40 UTC by Manuel Rüger (RETIRED)
Modified: 2022-10-01 02:48 UTC (History)
4 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 Manuel Rüger (RETIRED) gentoo-dev 2014-03-29 17:40:06 UTC
Eclasses ban old EAPIs from time to time and currently there is no way to announce the removal (except for mails to -dev).

An eclass should be able to introduce vars called DEPRECATED_EAPI and BANNED_EAPI.

example.eclass sets:

DEPRECATED_EAPI="4"
BANNED_EAPI="1 2 3"

example-A.ebuild:

EAPI=1

Result:

repoman will prompt an error and refuse to add the ebuild to the VCS.


example-B.ebuild:

EAPI=4

Result:

repoman will prompt a deprecation warning, ebuild can be added to VCS.
Comment 1 Chris Reffett (RETIRED) gentoo-dev Security 2014-03-29 17:53:18 UTC
+1, this could be set up so that we can move deprecation/banning checks from eclass code to portage, i.e. portage checks EAPI, if EAPI in banned it prints a standard bailout message.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2014-03-29 21:17:15 UTC
These environmental variables are rather wrong idea since ebuild can inherit multiple eclasses and different eclasses can set environmental variables to different values.
A special, parsed marker in comment would be better.
(Anyway die() in global scope is more effective for banned EAPIs.)
Comment 3 Manuel Rüger (RETIRED) gentoo-dev 2014-03-31 02:25:01 UTC
So better proposal would be 

# @DEPRECATED_EAPI 4
# @BANNED_EAPI 1 2 3

as already used for @DEAD?
Comment 4 William L. Thomson Jr. 2015-03-20 16:21:33 UTC
I like comment #3, and it should produce a warning or not allow you to commit anything that is not at the current EAPI level. That way people are forced to update to current EAPI anytime they commit anything.

Though that might cause issues for stablization keywording.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-12 03:18:22 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.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-12 03:41:13 UTC
I'm not sure if pkgcheck actually does this right now.
Comment 7 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2022-09-30 15:50:55 UTC
This is done at two stages:

1. banned EAPI is put as such using the eclass EAPI guard, resulting in `die` in global scope, which results in pkgcheck failing hard and blocking it. If pushed to master (without checking), this breaks the repository and notifies the dev.

2. deprecated EAPI is marked as such in repo level, and is reported by pkgcheck as warning.