From dee77a2557fe0d8dbf83550a0eb5b1c8e136962c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 4 Feb 2009 19:18:45 +0000 Subject: [PATCH] =?utf8?q?Warn=20about=20WANT=5FAUTO(CONF|MAKE)=3Dlatest?= =?utf8?q?=20settings=20since=20they=20are=20redundant.=20Thanks=20to=20Pe?= =?utf8?q?tteri=20R=C3=A4ty=20=20for=20the=20initial=20pat?= =?utf8?q?ch.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit svn path=/main/trunk/; revision=12583 --- pym/repoman/checks.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index c9ef91cfc..e89020980 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -328,13 +328,25 @@ class DeprecatedBindnowFlags(LineCheck): re = re.compile(r'.*\$\(bindnow-flags\)') error = errors.DEPRECATED_BINDNOW_FLAGS +class WantAutoDefaultValue(LineCheck): + """Check setting WANT_AUTO* to latest (default value).""" + repoman_check_name = 'ebuild.minorsyn' + _re = re.compile(r'^WANT_AUTO(CONF|MAKE)=(\'|")?latest') + + def check(self, num, line): + m = self._re.match(line) + if m is not None: + return 'WANT_AUTO' + m.group(1) + \ + ' redundantly set to default value "latest" on line: %d' + _constant_checks = tuple((c() for c in ( EbuildHeader, EbuildWhitespace, EbuildQuote, EbuildAssignment, EbuildUselessDodoc, EbuildUselessCdS, EbuildNestedDie, EbuildPatches, EbuildQuotedA, IUseUndefined, ImplicitRuntimeDeps, InheritAutotools, - EMakeParallelDisabled, DeprecatedBindnowFlags))) + EMakeParallelDisabled, DeprecatedBindnowFlags, + WantAutoDefaultValue))) def run_checks(contents, pkg): checks = _constant_checks -- 2.26.2