summaryrefslogtreecommitdiffstats
path: root/pym/repoman
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-10-08 07:34:09 -0700
committerZac Medico <zmedico@gentoo.org>2012-10-08 07:34:09 -0700
commita0adfb21ec64da8013265adfb2ed9ffb18e6a2b4 (patch)
tree02c5c0357488774ada8b0b072f47a09d29792d85 /pym/repoman
parent202a55ef437e8d472f25a8013b5694efee855e78 (diff)
downloadportage-a0adfb21ec64da8013265adfb2ed9ffb18e6a2b4.tar.gz
portage-a0adfb21ec64da8013265adfb2ed9ffb18e6a2b4.tar.bz2
portage-a0adfb21ec64da8013265adfb2ed9ffb18e6a2b4.zip
repoman: check EXTRA_ECONF/EMAKE, bug #437348
Diffstat (limited to 'pym/repoman')
-rw-r--r--pym/repoman/checks.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py
index 7e3d4b875..b47028ca7 100644
--- a/pym/repoman/checks.py
+++ b/pym/repoman/checks.py
@@ -785,6 +785,19 @@ class PortageInternal(LineCheck):
if m is not None:
return ("'%s'" % m.group(2)) + " called on line: %d"
+class PortageInternalVariableAssignment(LineCheck):
+
+ repoman_check_name = 'portage.internal'
+ internal_assignment = re.compile(r'\s*(export\s+)?(EXTRA_ECONF|EXTRA_EMAKE)\+?=')
+
+ def check(self, num, line):
+ match = self.internal_assignment.match(line)
+ e = None
+ if match is not None:
+ e = 'Assignment to variable %s' % match.group(2)
+ e += ' on line: %d'
+ return e
+
_constant_checks = tuple(chain((c() for c in (
EbuildHeader, EbuildWhitespace, EbuildBlankLine, EbuildQuote,
EbuildAssignment, Eapi3EbuildAssignment, EbuildUselessDodoc,
@@ -796,7 +809,7 @@ _constant_checks = tuple(chain((c() for c in (
SrcCompileEconf, Eapi3DeprecatedFuncs, NoOffsetWithHelpers,
Eapi4IncompatibleFuncs, Eapi4GoneVars, BuiltWithUse,
PreserveOldLib, SandboxAddpredict, PortageInternal,
- DeprecatedUseq, DeprecatedHasq)),
+ PortageInternalVariableAssignment, DeprecatedUseq, DeprecatedHasq)),
(InheritEclass(k, **kwargs) for k, kwargs in _eclass_info.items())))
_here_doc_re = re.compile(r'.*\s<<[-]?(\w+)$')