diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-02-04 19:18:45 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-02-04 19:18:45 +0000 |
commit | dee77a2557fe0d8dbf83550a0eb5b1c8e136962c (patch) | |
tree | bcb4a717795464ef45bf4404e38a590bdcaa7aac | |
parent | 465f960ebcd0c01455b0397de37b656ab5e44804 (diff) | |
download | portage-dee77a2557fe0d8dbf83550a0eb5b1c8e136962c.tar.gz portage-dee77a2557fe0d8dbf83550a0eb5b1c8e136962c.tar.bz2 portage-dee77a2557fe0d8dbf83550a0eb5b1c8e136962c.zip |
Warn about WANT_AUTO(CONF|MAKE)=latest settings since they are redundant.
Thanks to Petteri Räty <betelgeuse@g.o> for the initial patch.
svn path=/main/trunk/; revision=12583
-rw-r--r-- | pym/repoman/checks.py | 14 |
1 files changed, 13 insertions, 1 deletions
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 |