Gentoo Archives: gentoo-portage-dev

From: Sebastian Luther <SebastianLuther@×××.de>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH v3] Add repoman check to warn if src_prepare/src_configure are used in EAPI 0/1 and if pkg_pretend is used in EAPI < 4. Fixes bug 379491.
Date: Wed, 15 Jan 2014 21:12:01
Message-Id: 52D6F99D.4010308@gmx.de
In Reply to: [gentoo-portage-dev] [PATCH v3] Add repoman check to warn if src_prepare/src_configure are used in EAPI 0/1 and if pkg_pretend is used in EAPI < 4. Fixes bug 379491. by Chris Reffett
1 Am 15.01.2014 22:03, schrieb Chris Reffett:
2 > + def check_eapi(self, eapi):
3 > + return eapi in ('0', '1')
4 > +
5
6 Instead of hard coding EAPIs here, you should use the functions in
7 portage.eapi like eapi_has_src_prepare_and_src_configure().
8
9 Same applies for the later part of the patch.
10
11 The class names of the checks have the same issue. I understand that
12 there are existing checks with such names, but that doesn't mean that's
13 a good idea to keep using them.
14 You could name them after the phases you're checking for.
15
16 Sebastian