aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2017-07-15 01:09:03 +0000
committerZac Medico <zmedico@gentoo.org>2018-03-29 20:51:20 -0700
commitef62ffac353970086f93d84541725ef718100c7b (patch)
treefba9477330e30533b94b9ad2000887586938905e
parentrepoman: New linechecks module, workaround (diff)
downloadportage-ef62ffac353970086f93d84541725ef718100c7b.tar.gz
portage-ef62ffac353970086f93d84541725ef718100c7b.tar.bz2
portage-ef62ffac353970086f93d84541725ef718100c7b.zip
repoman: Convert multicheck module to the new linechecks sub-module
-rw-r--r--repoman/pym/repoman/modules/scan/ebuild/__init__.py2
-rw-r--r--repoman/pym/repoman/modules/scan/ebuild/multicheck.py10
-rw-r--r--repoman/pym/repoman/scanner.py1
3 files changed, 9 insertions, 4 deletions
diff --git a/repoman/pym/repoman/modules/scan/ebuild/__init__.py b/repoman/pym/repoman/modules/scan/ebuild/__init__.py
index 3e1d31951..1d8ec1941 100644
--- a/repoman/pym/repoman/modules/scan/ebuild/__init__.py
+++ b/repoman/pym/repoman/modules/scan/ebuild/__init__.py
@@ -47,7 +47,7 @@ module_spec = {
'functions': ['check'],
'func_kwargs': {
},
- 'mod_kwargs': ['qatracker', 'options'
+ 'mod_kwargs': ['qatracker', 'options', 'repo_settings', 'linechecks',
],
'func_kwargs': {
'ebuild': (None, None),
diff --git a/repoman/pym/repoman/modules/scan/ebuild/multicheck.py b/repoman/pym/repoman/modules/scan/ebuild/multicheck.py
index 9e36e2a68..94526ae9e 100644
--- a/repoman/pym/repoman/modules/scan/ebuild/multicheck.py
+++ b/repoman/pym/repoman/modules/scan/ebuild/multicheck.py
@@ -8,7 +8,7 @@ import io
from portage import _encodings, _unicode_encode
from repoman.modules.scan.scanbase import ScanBase
-from .checks import run_checks, checks_init
+from repoman.modules.linechecks.controller import LineCheckController
class MultiCheck(ScanBase):
@@ -22,7 +22,11 @@ class MultiCheck(ScanBase):
'''
self.qatracker = kwargs.get('qatracker')
self.options = kwargs.get('options')
- checks_init(self.options.experimental_inherit == 'y')
+ self.controller = LineCheckController(
+ kwargs.get('repo_settings'),
+ kwargs.get('linechecks')
+ )
+ self.controller.checks_init(self.options.experimental_inherit == 'y')
def check(self, **kwargs):
'''Check the ebuild for utf-8 encoding
@@ -40,7 +44,7 @@ class MultiCheck(ScanBase):
errors='strict'),
mode='r', encoding=_encodings['repo.content'])
try:
- for check_name, e in run_checks(f, pkg):
+ for check_name, e in self.controller.run_checks(f, pkg):
self.qatracker.add_error(
check_name, ebuild.relative_path + ': %s' % e)
finally:
diff --git a/repoman/pym/repoman/scanner.py b/repoman/pym/repoman/scanner.py
index b3d030570..d61e50131 100644
--- a/repoman/pym/repoman/scanner.py
+++ b/repoman/pym/repoman/scanner.py
@@ -193,6 +193,7 @@ class Scanner(object):
"env": self.env,
"have": self.have,
"dev_keywords": self.dev_keywords,
+ "linechecks": self.moduleconfig.linechecks,
}
# initialize the plugin checks here
self.modules = {}