From 20817801dd4ef0117bcc7b33c90650da1e920385 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 8 May 2012 23:38:47 -0700 Subject: Parse EAPI with pattern from PMS section 7.3.1. This implements the specification that was approved in Gentoo's council meeting on May 8, 2012 (see bug #402167). The parse-eapi-ebuild-head FEATURES setting is now enabled by default, and causes non-conformant ebuilds to be treated as invalid. This behavior will soon become enabled unconditionally. --- pym/repoman/checks.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'pym/repoman') diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index 733bbc3c1..77df603a2 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -8,6 +8,7 @@ and correctness of an ebuild.""" import re import time import repoman.errors as errors +import portage from portage.eapi import eapi_supports_prefix, eapi_has_implicit_rdepend, \ eapi_has_src_prepare_and_src_configure, eapi_has_dosed_dohard, \ eapi_exports_AA, eapi_exports_KV @@ -284,14 +285,12 @@ class EbuildUselessCdS(LineCheck): class EapiDefinition(LineCheck): """ - Check that EAPI assignment conforms to PMS section 8.3.1 + Check that EAPI assignment conforms to PMS section 7.3.1 (first non-comment, non-blank line). """ repoman_check_name = 'EAPI.definition' ignore_comment = True - - # This pattern is specified by PMS section 8.3.1. - _eapi_re = re.compile(r"^[ \t]*EAPI=(['\"]?)([A-Za-z0-9+_.-]*)\1[ \t]*(#.*)?$") + _eapi_re = portage._pms_eapi_re def new(self, pkg): self._cached_eapi = pkg.metadata['EAPI'] -- cgit v1.2.3-1-g7c22