diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-06-07 09:23:56 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-06-07 09:23:56 +0000 |
commit | a919fb03d4cbdf5e3b77b269459e762d536a7b38 (patch) | |
tree | be63a6609085fc9106b493e11de8cafc8e4d2c59 | |
parent | 741db623a079e3a0b767fb1c8f0b9fae6789285e (diff) | |
download | portage-a919fb03d4cbdf5e3b77b269459e762d536a7b38.tar.gz portage-a919fb03d4cbdf5e3b77b269459e762d536a7b38.tar.bz2 portage-a919fb03d4cbdf5e3b77b269459e762d536a7b38.zip |
Bug #224271 - Add a 'IUSE is not defined' ebuild.minorsyn warning.
svn path=/main/trunk/; revision=10589
-rw-r--r-- | pym/repoman/checks.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index 8f9fd1abc..0a314518c 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -217,13 +217,20 @@ _constant_checks = tuple((c() for c in ( EbuildUselessCdS, EbuildNestedDie, EbuildPatches, EbuildQuotedA))) +_iuse_def_re = re.compile(r'^IUSE=.*') + def run_checks(contents, st_mtime): checks = list(_constant_checks) checks.append(EbuildHeader(st_mtime)) + iuse_def = None for num, line in enumerate(contents): + if iuse_def is None: + iuse_def = _iuse_def_re.match(line) for lc in checks: ignore = lc.ignore_line if not ignore or not ignore.match(line): e = lc.check(num, line) if e: yield lc.repoman_check_name, e % (num + 1) + if iuse_def is None: + yield 'ebuild.minorsyn', 'IUSE is not defined' |