Pass a Package instance into LineCheck.new(). (trunk r10725)
authorZac Medico <zmedico@gentoo.org>
Thu, 19 Jun 2008 05:30:28 +0000 (05:30 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 19 Jun 2008 05:30:28 +0000 (05:30 -0000)
svn path=/main/branches/2.1.2/; revision=10726

bin/repoman

index 3439995c2a537e0a26b53ac54468b36f4a610df9..d108db4b32463b3e5d028eadc74f727eeb9bf05c 100755 (executable)
@@ -997,7 +997,7 @@ class LineCheck(object):
        """A regular expression to determine whether to ignore the line"""
        ignore_line = False
 
-       def new(self):
+       def new(self, pkg):
                pass
 
        def check(self, num, line):
@@ -1138,7 +1138,7 @@ class InheritAutotools(LineCheck):
        _autotools_func_re = re.compile(r'(^|\s)(' + \
                "|".join(_autotools_funcs) + ')(\s|$)')
 
-       def new(self):
+       def new(self, pkg):
                self._inherit_autotools = None
                self._autotools_func_call = None
 
@@ -1162,7 +1162,7 @@ class IUseUndefined(LineCheck):
        repoman_check_name = 'IUSE.undefined'
        _iuse_def_re = re.compile(r'^IUSE=.*')
 
-       def new(self):
+       def new(self, pkg):
                self._iuse_def = None
 
        def check(self, num, line):
@@ -1183,7 +1183,7 @@ def run_checks(contents, pkg):
        checks = _constant_checks
 
        for lc in checks:
-               lc.new()
+               lc.new(pkg)
        for num, line in enumerate(contents):
                for lc in checks:
                        ignore = lc.ignore_line