From a8be8f23dc84e92b9163f152af9640c2a37bad0b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 25 Feb 2011 16:19:01 -0800 Subject: repoman: add back portage.internal check This check got removed for bug #262365, but now that EAPI 4 is released we can add it back. Now it checks for ecompress/ecompressdir too (for bug #218347). --- pym/repoman/checks.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'pym') diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index 5bf039b99..a05c128fe 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -623,6 +623,16 @@ class Eapi4GoneVars(LineCheck): return ("variable '$%s'" % m.group(1)) + \ " is gone in EAPI=4 on line: %d" +class PortageInternal(LineCheck): + repoman_check_name = 'portage.internal' + re = re.compile(r'[^#]*\b(ecompress|ecompressdir|prepalldocs)\b') + + def check(self, num, line): + """Run the check on line and return error if there is one""" + m = self.re.match(line) + if m is not None: + return ("'%s'" % m.group(1)) + " called on line: %d" + _constant_checks = tuple((c() for c in ( EbuildHeader, EbuildWhitespace, EbuildBlankLine, EbuildQuote, EbuildAssignment, Eapi3EbuildAssignment, EbuildUselessDodoc, @@ -633,7 +643,7 @@ _constant_checks = tuple((c() for c in ( DeprecatedBindnowFlags, SrcUnpackPatches, WantAutoDefaultValue, SrcCompileEconf, Eapi3DeprecatedFuncs, NoOffsetWithHelpers, Eapi4IncompatibleFuncs, Eapi4GoneVars, BuiltWithUse, - PreserveOldLib, SandboxAddpredict))) + PreserveOldLib, SandboxAddpredict, PortageInternal))) _here_doc_re = re.compile(r'.*\s<<[-]?(\w+)$') -- cgit v1.2.3-1-g7c22