summaryrefslogtreecommitdiffstats
path: root/pym/repoman
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-06-18 08:11:24 +0000
committerZac Medico <zmedico@gentoo.org>2008-06-18 08:11:24 +0000
commit97916d197e86afef0c8ec88329dace796384b3a3 (patch)
tree533bae31e3c195fe4d77a98e7bf10c0562b2f83e /pym/repoman
parent289d6c3d11f9cab096c6d4deaf063b3879fe690c (diff)
downloadportage-97916d197e86afef0c8ec88329dace796384b3a3.tar.gz
portage-97916d197e86afef0c8ec88329dace796384b3a3.tar.bz2
portage-97916d197e86afef0c8ec88329dace796384b3a3.zip
As suggested by remi`, make the 'inherit.autotools' check only ebuilds that
inherit the autotools eclass directly (rather than indirectly through an eclass such as apache-2 or x-modular). svn path=/main/trunk/; revision=10715
Diffstat (limited to 'pym/repoman')
-rw-r--r--pym/repoman/checks.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py
index dbd3b5ccc..b4caff27f 100644
--- a/pym/repoman/checks.py
+++ b/pym/repoman/checks.py
@@ -219,28 +219,26 @@ _constant_checks = tuple((c() for c in (
_iuse_def_re = re.compile(r'^IUSE=.*')
_comment_re = re.compile(r'(^|\s*)#')
+_inherit_autotools_re = re.compile(r'^\s*inherit\s(.*\s)?autotools(\s|$)')
_autotools_funcs = (
"eaclocal", "eautoconf", "eautoheader",
"eautomake", "eautoreconf", "_elibtoolize")
_autotools_func_re = re.compile(r'(^|\s)(' + \
"|".join(_autotools_funcs) + ')(\s|$)')
-# eclasses that inherit autotools and call it's functions
-_autotools_eclasses = frozenset(["apache-2", "x-modular"])
-
def run_checks(contents, pkg):
checks = list(_constant_checks)
checks.append(EbuildHeader(pkg.mtime))
iuse_def = None
- inherit_autotools = "autotools" in pkg.inherited
- if inherit_autotools:
- if _autotools_eclasses.intersection(pkg.inherited):
- inherit_autotools = False
+ inherit_autotools = None
autotools_func_call = None
for num, line in enumerate(contents):
comment = _comment_re.match(line)
if comment is None:
- if inherit_autotools and autotools_func_call is None:
+ if inherit_autotools is None:
+ inherit_autotools = _inherit_autotools_re.match(line)
+ if inherit_autotools is not None and \
+ autotools_func_call is None:
autotools_func_call = _autotools_func_re.search(line)
if iuse_def is None:
iuse_def = _iuse_def_re.match(line)