summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-06-07 09:28:08 +0000
committerZac Medico <zmedico@gentoo.org>2008-06-07 09:28:08 +0000
commitac6f697904f15454e6708d95a80d7a0377ee8830 (patch)
tree878c227defea8d594a96626f79841a9ef96bcfad /bin
parent1af4736e0cab3a9d1fe18697bc0e00257cbaa6d7 (diff)
downloadportage-ac6f697904f15454e6708d95a80d7a0377ee8830.tar.gz
portage-ac6f697904f15454e6708d95a80d7a0377ee8830.tar.bz2
portage-ac6f697904f15454e6708d95a80d7a0377ee8830.zip
Bug #224271 - Add a 'IUSE is not defined' ebuild.minorsyn warning.
(trunk r10589) svn path=/main/branches/2.1.2/; revision=10590
Diffstat (limited to 'bin')
-rwxr-xr-xbin/repoman7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/repoman b/bin/repoman
index 4749523dd..0ebe79de2 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -1108,14 +1108,21 @@ _constant_checks = tuple((c() for c in (
EbuildUselessCdS, EbuildNestedDie,
EbuildPatches, EbuildQuotedA)))
+_iuse_def_re = re.compile(r'^IUSE=.*')
+
def run_checks(contents):
+ iuse_def = None
for num, line in enumerate(contents):
+ if iuse_def is None:
+ iuse_def = _iuse_def_re.match(line)
for lc in _constant_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'
if mymode == "commit":
retval = ("","")