public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/checks/ebuilds/variables/, pym/repoman/modules/scan/metadata/, ...
@ 2016-01-06  4:21 Brian Dolbec
  0 siblings, 0 replies; 7+ messages in thread
From: Brian Dolbec @ 2016-01-06  4:21 UTC (permalink / raw
  To: gentoo-commits

commit:     02706a4e6788795c935d285c9c9c0b00e52acb98
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  3 23:09:27 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Jan  6 04:08:23 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=02706a4e

repoman: Migrate license checks to a plugin module

 pym/repoman/checks/ebuilds/variables/license.py | 47 ----------------------
 pym/repoman/modules/scan/metadata/__init__.py   |  8 ++++
 pym/repoman/modules/scan/metadata/license.py    | 53 +++++++++++++++++++++++++
 pym/repoman/scanner.py                          |  7 +---
 4 files changed, 62 insertions(+), 53 deletions(-)

diff --git a/pym/repoman/checks/ebuilds/variables/license.py b/pym/repoman/checks/ebuilds/variables/license.py
deleted file mode 100644
index bdc859c..0000000
--- a/pym/repoman/checks/ebuilds/variables/license.py
+++ /dev/null
@@ -1,47 +0,0 @@
-
-'''description.py
-Perform checks on the LICENSE variable.
-'''
-
-# import our initialized portage instance
-from repoman._portage import portage
-
-
-class LicenseChecks(object):
-	'''Perform checks on the LICENSE variable.'''
-
-	def __init__(self, qatracker, liclist, liclist_deprecated):
-		'''
-		@param qatracker: QATracker instance
-		@param liclist: List of licenses.
-		@param liclist: List of deprecated licenses.
-		'''
-		self.qatracker = qatracker
-		self.liclist = liclist
-		self.liclist_deprecated = liclist_deprecated
-
-	def check(
-		self, pkg, package, ebuild, y_ebuild):
-		'''
-		@param pkg: Package in which we check (object).
-		@param package: Package in which we check (string).
-		@param ebuild: Ebuild which we check (object).
-		@param y_ebuild: Ebuild which we check (string).
-		'''
-
-		# Parse the LICENSE variable, remove USE conditions and flatten it.
-		licenses = portage.dep.use_reduce(
-			pkg._metadata["LICENSE"], matchall=1, flat=True)
-
-		# Check each entry to ensure that it exists in ${PORTDIR}/licenses/.
-		for lic in licenses:
-			# Need to check for "||" manually as no portage
-			# function will remove it without removing values.
-			if lic not in self.liclist and lic != "||":
-				self.qatracker.add_error(
-					"LICENSE.invalid",
-					package + "/" + y_ebuild + ".ebuild: %s" % lic)
-			elif lic in self.liclist_deprecated:
-				self.qatracker.add_error(
-					"LICENSE.deprecated",
-					"%s: %s" % (ebuild.relative_path, lic))

diff --git a/pym/repoman/modules/scan/metadata/__init__.py b/pym/repoman/modules/scan/metadata/__init__.py
index 2506521..ed0c59d 100644
--- a/pym/repoman/modules/scan/metadata/__init__.py
+++ b/pym/repoman/modules/scan/metadata/__init__.py
@@ -34,6 +34,14 @@ module_spec = {
 			'func_desc': {
 			},
 		},
+		'license-metadata': {
+			'name': "license",
+			'class': "LicenseChecks",
+			'description': doc,
+			'functions': ['check'],
+			'func_desc': {
+			},
+		},
 	}
 }
 

diff --git a/pym/repoman/modules/scan/metadata/license.py b/pym/repoman/modules/scan/metadata/license.py
new file mode 100644
index 0000000..b022b20
--- /dev/null
+++ b/pym/repoman/modules/scan/metadata/license.py
@@ -0,0 +1,53 @@
+
+'''license.py
+Perform checks on the LICENSE variable.
+'''
+
+# import our initialized portage instance
+from repoman._portage import portage
+
+
+class LicenseChecks(object):
+	'''Perform checks on the LICENSE variable.'''
+
+	def __init__(self, **kwargs):
+		'''
+		@param qatracker: QATracker instance
+		@param repo_metadata: dictionary of various repository items.
+		'''
+		self.qatracker = kwargs.get('qatracker')
+		self.repo_metadata = kwargs.get('repo_metadata')
+
+	def check(self, **kwargs):
+		'''
+		@param xpkg: Package in which we check (string).
+		@param ebuild: Ebuild which we check (object).
+		@param y_ebuild: Ebuild which we check (string).
+		'''
+		xpkg = kwargs.get('xpkg')
+		ebuild = kwargs.get('ebuild')
+		y_ebuild = kwargs.get('y_ebuild')
+		if not kwargs.get('badlicsyntax'):
+			# Parse the LICENSE variable, remove USE conditions and flatten it.
+			licenses = portage.dep.use_reduce(
+				ebuild.metadata["LICENSE"], matchall=1, flat=True)
+
+			# Check each entry to ensure that it exists in ${PORTDIR}/licenses/.
+			for lic in licenses:
+				# Need to check for "||" manually as no portage
+				# function will remove it without removing values.
+				if lic not in self.repo_metadata['liclist'] and lic != "||":
+					self.qatracker.add_error("LICENSE.invalid",
+						"%s/%s.ebuild: %s" % (xpkg, y_ebuild, lic))
+				elif lic in self.repo_metadata['lic_deprecated']:
+					self.qatracker.add_error("LICENSE.deprecated",
+						"%s: %s" % (ebuild.relative_path, lic))
+		return {'continue': False}
+
+	@property
+	def runInPkgs(self):
+		return (False, [])
+
+	@property
+	def runInEbuilds(self):
+		return (True, [self.check])

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 5e42faf..ea1869f 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -18,7 +18,6 @@ from portage import _unicode_encode
 from portage.dep import Atom
 from portage.output import green
 from repoman.checks.ebuilds.checks import run_checks
-from repoman.checks.ebuilds.variables.license import LicenseChecks
 from repoman.checks.ebuilds.variables.restrict import RestrictChecks
 from repoman.modules.commit import repochecks
 from repoman.profile import check_profiles, dev_profile_keywords, setup_profile
@@ -212,7 +211,6 @@ class Scanner(object):
 			self.modules[mod_class.__name__] = mod_class(**self.kwargs)
 
 		# initialize our checks classes here before the big xpkg loop
-		self.licensecheck = LicenseChecks(self.qatracker, liclist, liclist_deprecated)
 		self.restrictcheck = RestrictChecks(self.qatracker)
 
 
@@ -301,6 +299,7 @@ class Scanner(object):
 				('description', 'DescriptionChecks'), (None, 'KeywordChecks'),
 				('arches', 'ArchChecks'), ('depend', 'DependChecks'),
 				('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
+				('license', 'LicenseChecks'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -331,10 +330,6 @@ class Scanner(object):
 
 			print("**** finished plugin loop, continuing...")
 
-			# license checks
-			if not dynamic_data['badlicsyntax']:
-				self.licensecheck.check(dynamic_data['pkg'], xpkg, dynamic_data['ebuild'], y_ebuild)
-
 			self.restrictcheck.check(dynamic_data['pkg'], xpkg, dynamic_data['ebuild'], y_ebuild)
 
 			# Syntax Checks


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/checks/ebuilds/variables/, pym/repoman/modules/scan/metadata/, ...
@ 2016-01-10  3:26 Brian Dolbec
  0 siblings, 0 replies; 7+ messages in thread
From: Brian Dolbec @ 2016-01-10  3:26 UTC (permalink / raw
  To: gentoo-commits

commit:     3070f601e972e077e1cc0414d1452683f6139858
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  3 23:09:27 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sun Jan 10 03:23:51 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=3070f601

repoman: Migrate license checks to a plugin module

 pym/repoman/checks/ebuilds/variables/license.py | 47 ----------------------
 pym/repoman/modules/scan/metadata/__init__.py   |  8 ++++
 pym/repoman/modules/scan/metadata/license.py    | 53 +++++++++++++++++++++++++
 pym/repoman/scanner.py                          |  7 +---
 4 files changed, 62 insertions(+), 53 deletions(-)

diff --git a/pym/repoman/checks/ebuilds/variables/license.py b/pym/repoman/checks/ebuilds/variables/license.py
deleted file mode 100644
index bdc859c..0000000
--- a/pym/repoman/checks/ebuilds/variables/license.py
+++ /dev/null
@@ -1,47 +0,0 @@
-
-'''description.py
-Perform checks on the LICENSE variable.
-'''
-
-# import our initialized portage instance
-from repoman._portage import portage
-
-
-class LicenseChecks(object):
-	'''Perform checks on the LICENSE variable.'''
-
-	def __init__(self, qatracker, liclist, liclist_deprecated):
-		'''
-		@param qatracker: QATracker instance
-		@param liclist: List of licenses.
-		@param liclist: List of deprecated licenses.
-		'''
-		self.qatracker = qatracker
-		self.liclist = liclist
-		self.liclist_deprecated = liclist_deprecated
-
-	def check(
-		self, pkg, package, ebuild, y_ebuild):
-		'''
-		@param pkg: Package in which we check (object).
-		@param package: Package in which we check (string).
-		@param ebuild: Ebuild which we check (object).
-		@param y_ebuild: Ebuild which we check (string).
-		'''
-
-		# Parse the LICENSE variable, remove USE conditions and flatten it.
-		licenses = portage.dep.use_reduce(
-			pkg._metadata["LICENSE"], matchall=1, flat=True)
-
-		# Check each entry to ensure that it exists in ${PORTDIR}/licenses/.
-		for lic in licenses:
-			# Need to check for "||" manually as no portage
-			# function will remove it without removing values.
-			if lic not in self.liclist and lic != "||":
-				self.qatracker.add_error(
-					"LICENSE.invalid",
-					package + "/" + y_ebuild + ".ebuild: %s" % lic)
-			elif lic in self.liclist_deprecated:
-				self.qatracker.add_error(
-					"LICENSE.deprecated",
-					"%s: %s" % (ebuild.relative_path, lic))

diff --git a/pym/repoman/modules/scan/metadata/__init__.py b/pym/repoman/modules/scan/metadata/__init__.py
index 2506521..ed0c59d 100644
--- a/pym/repoman/modules/scan/metadata/__init__.py
+++ b/pym/repoman/modules/scan/metadata/__init__.py
@@ -34,6 +34,14 @@ module_spec = {
 			'func_desc': {
 			},
 		},
+		'license-metadata': {
+			'name': "license",
+			'class': "LicenseChecks",
+			'description': doc,
+			'functions': ['check'],
+			'func_desc': {
+			},
+		},
 	}
 }
 

diff --git a/pym/repoman/modules/scan/metadata/license.py b/pym/repoman/modules/scan/metadata/license.py
new file mode 100644
index 0000000..b022b20
--- /dev/null
+++ b/pym/repoman/modules/scan/metadata/license.py
@@ -0,0 +1,53 @@
+
+'''license.py
+Perform checks on the LICENSE variable.
+'''
+
+# import our initialized portage instance
+from repoman._portage import portage
+
+
+class LicenseChecks(object):
+	'''Perform checks on the LICENSE variable.'''
+
+	def __init__(self, **kwargs):
+		'''
+		@param qatracker: QATracker instance
+		@param repo_metadata: dictionary of various repository items.
+		'''
+		self.qatracker = kwargs.get('qatracker')
+		self.repo_metadata = kwargs.get('repo_metadata')
+
+	def check(self, **kwargs):
+		'''
+		@param xpkg: Package in which we check (string).
+		@param ebuild: Ebuild which we check (object).
+		@param y_ebuild: Ebuild which we check (string).
+		'''
+		xpkg = kwargs.get('xpkg')
+		ebuild = kwargs.get('ebuild')
+		y_ebuild = kwargs.get('y_ebuild')
+		if not kwargs.get('badlicsyntax'):
+			# Parse the LICENSE variable, remove USE conditions and flatten it.
+			licenses = portage.dep.use_reduce(
+				ebuild.metadata["LICENSE"], matchall=1, flat=True)
+
+			# Check each entry to ensure that it exists in ${PORTDIR}/licenses/.
+			for lic in licenses:
+				# Need to check for "||" manually as no portage
+				# function will remove it without removing values.
+				if lic not in self.repo_metadata['liclist'] and lic != "||":
+					self.qatracker.add_error("LICENSE.invalid",
+						"%s/%s.ebuild: %s" % (xpkg, y_ebuild, lic))
+				elif lic in self.repo_metadata['lic_deprecated']:
+					self.qatracker.add_error("LICENSE.deprecated",
+						"%s: %s" % (ebuild.relative_path, lic))
+		return {'continue': False}
+
+	@property
+	def runInPkgs(self):
+		return (False, [])
+
+	@property
+	def runInEbuilds(self):
+		return (True, [self.check])

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index d5faded..1f792bd 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -18,7 +18,6 @@ from portage import _unicode_encode
 from portage.dep import Atom
 from portage.output import green
 from repoman.checks.ebuilds.checks import run_checks
-from repoman.checks.ebuilds.variables.license import LicenseChecks
 from repoman.checks.ebuilds.variables.restrict import RestrictChecks
 from repoman.modules.commit import repochecks
 from repoman.profile import check_profiles, dev_profile_keywords, setup_profile
@@ -210,7 +209,6 @@ class Scanner(object):
 			self.modules[mod_class.__name__] = mod_class(**self.kwargs)
 
 		# initialize our checks classes here before the big xpkg loop
-		self.licensecheck = LicenseChecks(self.qatracker, liclist, liclist_deprecated)
 		self.restrictcheck = RestrictChecks(self.qatracker)
 
 
@@ -297,6 +295,7 @@ class Scanner(object):
 				('description', 'DescriptionChecks'), (None, 'KeywordChecks'),
 				('arches', 'ArchChecks'), ('depend', 'DependChecks'),
 				('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
+				('license', 'LicenseChecks'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -324,10 +323,6 @@ class Scanner(object):
 			if y_ebuild_continue:
 				continue
 
-			# license checks
-			if not dynamic_data['badlicsyntax']:
-				self.licensecheck.check(dynamic_data['pkg'], xpkg, dynamic_data['ebuild'], y_ebuild)
-
 			self.restrictcheck.check(dynamic_data['pkg'], xpkg, dynamic_data['ebuild'], y_ebuild)
 
 			# Syntax Checks


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/checks/ebuilds/variables/, pym/repoman/modules/scan/metadata/, ...
@ 2016-01-11  8:01 Brian Dolbec
  0 siblings, 0 replies; 7+ messages in thread
From: Brian Dolbec @ 2016-01-11  8:01 UTC (permalink / raw
  To: gentoo-commits

commit:     f43380002e5bdc4c3f14f03eabaaaf12251a671c
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  3 23:10:48 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon Jan 11 08:00:18 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=f4338000

repoman: Migrate RestrictChecks to a plugin module

 pym/repoman/modules/scan/metadata/__init__.py      |  8 ++++++
 .../scan/metadata}/restrict.py                     | 29 +++++++++++++++-------
 pym/repoman/scanner.py                             |  7 +-----
 3 files changed, 29 insertions(+), 15 deletions(-)

diff --git a/pym/repoman/modules/scan/metadata/__init__.py b/pym/repoman/modules/scan/metadata/__init__.py
index ed0c59d..6ab44f6 100644
--- a/pym/repoman/modules/scan/metadata/__init__.py
+++ b/pym/repoman/modules/scan/metadata/__init__.py
@@ -42,6 +42,14 @@ module_spec = {
 			'func_desc': {
 			},
 		},
+		'restrict-metadata': {
+			'name': "restrict",
+			'class': "RestrictChecks",
+			'description': doc,
+			'functions': ['check'],
+			'func_desc': {
+			},
+		},
 	}
 }
 

diff --git a/pym/repoman/checks/ebuilds/variables/restrict.py b/pym/repoman/modules/scan/metadata/restrict.py
similarity index 54%
rename from pym/repoman/checks/ebuilds/variables/restrict.py
rename to pym/repoman/modules/scan/metadata/restrict.py
index 215b792..93ca298 100644
--- a/pym/repoman/checks/ebuilds/variables/restrict.py
+++ b/pym/repoman/modules/scan/metadata/restrict.py
@@ -12,21 +12,23 @@ from repoman.qa_data import valid_restrict
 class RestrictChecks(object):
 	'''Perform checks on the RESTRICT variable.'''
 
-	def __init__(self, qatracker):
+	def __init__(self, **kwargs):
 		'''
 		@param qatracker: QATracker instance
 		'''
-		self.qatracker = qatracker
+		self.qatracker = kwargs.get('qatracker')
 
-	def check(self, pkg, package, ebuild, y_ebuild):
+	def check(self, **kwargs):
+		xpkg = kwargs.get('xpkg')
+		ebuild = kwargs.get('ebuild')
+		y_ebuild = kwargs.get('y_ebuild')
 		myrestrict = None
 
 		try:
 			myrestrict = portage.dep.use_reduce(
-				pkg._metadata["RESTRICT"], matchall=1, flat=True)
+				ebuild.metadata["RESTRICT"], matchall=1, flat=True)
 		except portage.exception.InvalidDependString as e:
-			self. qatracker.add_error(
-				"RESTRICT.syntax",
+			self.qatracker.add_error("RESTRICT.syntax",
 				"%s: RESTRICT: %s" % (ebuild.relative_path, e))
 			del e
 
@@ -36,6 +38,15 @@ class RestrictChecks(object):
 
 			if mybadrestrict:
 				for mybad in mybadrestrict:
-					self.qatracker.add_error(
-						"RESTRICT.invalid",
-						package + "/" + y_ebuild + ".ebuild: %s" % mybad)
+					self.qatracker.add_error("RESTRICT.invalid",
+						"%s/%s.ebuild: %s" % (xpkg, y_ebuild, mybad))
+		return {'continue': False}
+
+	@property
+	def runInPkgs(self):
+		return (False, [])
+
+	@property
+	def runInEbuilds(self):
+		return (True, [self.check])
+

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 1f792bd..8657c73 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -18,7 +18,6 @@ from portage import _unicode_encode
 from portage.dep import Atom
 from portage.output import green
 from repoman.checks.ebuilds.checks import run_checks
-from repoman.checks.ebuilds.variables.restrict import RestrictChecks
 from repoman.modules.commit import repochecks
 from repoman.profile import check_profiles, dev_profile_keywords, setup_profile
 from repoman.repos import repo_metadata
@@ -209,8 +208,6 @@ class Scanner(object):
 			self.modules[mod_class.__name__] = mod_class(**self.kwargs)
 
 		# initialize our checks classes here before the big xpkg loop
-		self.restrictcheck = RestrictChecks(self.qatracker)
-
 
 	def scan_pkgs(self, can_force):
 		dynamic_data = {'can_force': can_force}
@@ -295,7 +292,7 @@ class Scanner(object):
 				('description', 'DescriptionChecks'), (None, 'KeywordChecks'),
 				('arches', 'ArchChecks'), ('depend', 'DependChecks'),
 				('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
-				('license', 'LicenseChecks'),
+				('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -323,8 +320,6 @@ class Scanner(object):
 			if y_ebuild_continue:
 				continue
 
-			self.restrictcheck.check(dynamic_data['pkg'], xpkg, dynamic_data['ebuild'], y_ebuild)
-
 			# Syntax Checks
 			if not self.vcs_settings.vcs_preserves_mtime:
 				if dynamic_data['ebuild'].ebuild_path not in self.changed.new_ebuilds and \


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/checks/ebuilds/variables/, pym/repoman/modules/scan/metadata/, ...
@ 2016-01-11  8:01 Brian Dolbec
  0 siblings, 0 replies; 7+ messages in thread
From: Brian Dolbec @ 2016-01-11  8:01 UTC (permalink / raw
  To: gentoo-commits

commit:     534ef968d08e289e4c5d349aaa8e26b8e312b748
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  3 23:09:27 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon Jan 11 08:00:18 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=534ef968

repoman: Migrate license checks to a plugin module

 pym/repoman/checks/ebuilds/variables/license.py | 47 ----------------------
 pym/repoman/modules/scan/metadata/__init__.py   |  8 ++++
 pym/repoman/modules/scan/metadata/license.py    | 53 +++++++++++++++++++++++++
 pym/repoman/scanner.py                          |  7 +---
 4 files changed, 62 insertions(+), 53 deletions(-)

diff --git a/pym/repoman/checks/ebuilds/variables/license.py b/pym/repoman/checks/ebuilds/variables/license.py
deleted file mode 100644
index bdc859c..0000000
--- a/pym/repoman/checks/ebuilds/variables/license.py
+++ /dev/null
@@ -1,47 +0,0 @@
-
-'''description.py
-Perform checks on the LICENSE variable.
-'''
-
-# import our initialized portage instance
-from repoman._portage import portage
-
-
-class LicenseChecks(object):
-	'''Perform checks on the LICENSE variable.'''
-
-	def __init__(self, qatracker, liclist, liclist_deprecated):
-		'''
-		@param qatracker: QATracker instance
-		@param liclist: List of licenses.
-		@param liclist: List of deprecated licenses.
-		'''
-		self.qatracker = qatracker
-		self.liclist = liclist
-		self.liclist_deprecated = liclist_deprecated
-
-	def check(
-		self, pkg, package, ebuild, y_ebuild):
-		'''
-		@param pkg: Package in which we check (object).
-		@param package: Package in which we check (string).
-		@param ebuild: Ebuild which we check (object).
-		@param y_ebuild: Ebuild which we check (string).
-		'''
-
-		# Parse the LICENSE variable, remove USE conditions and flatten it.
-		licenses = portage.dep.use_reduce(
-			pkg._metadata["LICENSE"], matchall=1, flat=True)
-
-		# Check each entry to ensure that it exists in ${PORTDIR}/licenses/.
-		for lic in licenses:
-			# Need to check for "||" manually as no portage
-			# function will remove it without removing values.
-			if lic not in self.liclist and lic != "||":
-				self.qatracker.add_error(
-					"LICENSE.invalid",
-					package + "/" + y_ebuild + ".ebuild: %s" % lic)
-			elif lic in self.liclist_deprecated:
-				self.qatracker.add_error(
-					"LICENSE.deprecated",
-					"%s: %s" % (ebuild.relative_path, lic))

diff --git a/pym/repoman/modules/scan/metadata/__init__.py b/pym/repoman/modules/scan/metadata/__init__.py
index 2506521..ed0c59d 100644
--- a/pym/repoman/modules/scan/metadata/__init__.py
+++ b/pym/repoman/modules/scan/metadata/__init__.py
@@ -34,6 +34,14 @@ module_spec = {
 			'func_desc': {
 			},
 		},
+		'license-metadata': {
+			'name': "license",
+			'class': "LicenseChecks",
+			'description': doc,
+			'functions': ['check'],
+			'func_desc': {
+			},
+		},
 	}
 }
 

diff --git a/pym/repoman/modules/scan/metadata/license.py b/pym/repoman/modules/scan/metadata/license.py
new file mode 100644
index 0000000..b022b20
--- /dev/null
+++ b/pym/repoman/modules/scan/metadata/license.py
@@ -0,0 +1,53 @@
+
+'''license.py
+Perform checks on the LICENSE variable.
+'''
+
+# import our initialized portage instance
+from repoman._portage import portage
+
+
+class LicenseChecks(object):
+	'''Perform checks on the LICENSE variable.'''
+
+	def __init__(self, **kwargs):
+		'''
+		@param qatracker: QATracker instance
+		@param repo_metadata: dictionary of various repository items.
+		'''
+		self.qatracker = kwargs.get('qatracker')
+		self.repo_metadata = kwargs.get('repo_metadata')
+
+	def check(self, **kwargs):
+		'''
+		@param xpkg: Package in which we check (string).
+		@param ebuild: Ebuild which we check (object).
+		@param y_ebuild: Ebuild which we check (string).
+		'''
+		xpkg = kwargs.get('xpkg')
+		ebuild = kwargs.get('ebuild')
+		y_ebuild = kwargs.get('y_ebuild')
+		if not kwargs.get('badlicsyntax'):
+			# Parse the LICENSE variable, remove USE conditions and flatten it.
+			licenses = portage.dep.use_reduce(
+				ebuild.metadata["LICENSE"], matchall=1, flat=True)
+
+			# Check each entry to ensure that it exists in ${PORTDIR}/licenses/.
+			for lic in licenses:
+				# Need to check for "||" manually as no portage
+				# function will remove it without removing values.
+				if lic not in self.repo_metadata['liclist'] and lic != "||":
+					self.qatracker.add_error("LICENSE.invalid",
+						"%s/%s.ebuild: %s" % (xpkg, y_ebuild, lic))
+				elif lic in self.repo_metadata['lic_deprecated']:
+					self.qatracker.add_error("LICENSE.deprecated",
+						"%s: %s" % (ebuild.relative_path, lic))
+		return {'continue': False}
+
+	@property
+	def runInPkgs(self):
+		return (False, [])
+
+	@property
+	def runInEbuilds(self):
+		return (True, [self.check])

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index d5faded..1f792bd 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -18,7 +18,6 @@ from portage import _unicode_encode
 from portage.dep import Atom
 from portage.output import green
 from repoman.checks.ebuilds.checks import run_checks
-from repoman.checks.ebuilds.variables.license import LicenseChecks
 from repoman.checks.ebuilds.variables.restrict import RestrictChecks
 from repoman.modules.commit import repochecks
 from repoman.profile import check_profiles, dev_profile_keywords, setup_profile
@@ -210,7 +209,6 @@ class Scanner(object):
 			self.modules[mod_class.__name__] = mod_class(**self.kwargs)
 
 		# initialize our checks classes here before the big xpkg loop
-		self.licensecheck = LicenseChecks(self.qatracker, liclist, liclist_deprecated)
 		self.restrictcheck = RestrictChecks(self.qatracker)
 
 
@@ -297,6 +295,7 @@ class Scanner(object):
 				('description', 'DescriptionChecks'), (None, 'KeywordChecks'),
 				('arches', 'ArchChecks'), ('depend', 'DependChecks'),
 				('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
+				('license', 'LicenseChecks'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -324,10 +323,6 @@ class Scanner(object):
 			if y_ebuild_continue:
 				continue
 
-			# license checks
-			if not dynamic_data['badlicsyntax']:
-				self.licensecheck.check(dynamic_data['pkg'], xpkg, dynamic_data['ebuild'], y_ebuild)
-
 			self.restrictcheck.check(dynamic_data['pkg'], xpkg, dynamic_data['ebuild'], y_ebuild)
 
 			# Syntax Checks


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/checks/ebuilds/variables/, pym/repoman/modules/scan/metadata/, ...
@ 2016-01-23  1:42 Brian Dolbec
  0 siblings, 0 replies; 7+ messages in thread
From: Brian Dolbec @ 2016-01-23  1:42 UTC (permalink / raw
  To: gentoo-commits

commit:     4515c25be6359b7fa76b1b56df46b823c52cfd63
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  3 23:09:27 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Jan 23 01:31:15 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=4515c25b

repoman: Migrate license checks to a plugin module

 pym/repoman/checks/ebuilds/variables/license.py | 47 ----------------------
 pym/repoman/modules/scan/metadata/__init__.py   |  9 +++++
 pym/repoman/modules/scan/metadata/license.py    | 53 +++++++++++++++++++++++++
 pym/repoman/scanner.py                          |  7 +---
 4 files changed, 63 insertions(+), 53 deletions(-)

diff --git a/pym/repoman/checks/ebuilds/variables/license.py b/pym/repoman/checks/ebuilds/variables/license.py
deleted file mode 100644
index bdc859c..0000000
--- a/pym/repoman/checks/ebuilds/variables/license.py
+++ /dev/null
@@ -1,47 +0,0 @@
-
-'''description.py
-Perform checks on the LICENSE variable.
-'''
-
-# import our initialized portage instance
-from repoman._portage import portage
-
-
-class LicenseChecks(object):
-	'''Perform checks on the LICENSE variable.'''
-
-	def __init__(self, qatracker, liclist, liclist_deprecated):
-		'''
-		@param qatracker: QATracker instance
-		@param liclist: List of licenses.
-		@param liclist: List of deprecated licenses.
-		'''
-		self.qatracker = qatracker
-		self.liclist = liclist
-		self.liclist_deprecated = liclist_deprecated
-
-	def check(
-		self, pkg, package, ebuild, y_ebuild):
-		'''
-		@param pkg: Package in which we check (object).
-		@param package: Package in which we check (string).
-		@param ebuild: Ebuild which we check (object).
-		@param y_ebuild: Ebuild which we check (string).
-		'''
-
-		# Parse the LICENSE variable, remove USE conditions and flatten it.
-		licenses = portage.dep.use_reduce(
-			pkg._metadata["LICENSE"], matchall=1, flat=True)
-
-		# Check each entry to ensure that it exists in ${PORTDIR}/licenses/.
-		for lic in licenses:
-			# Need to check for "||" manually as no portage
-			# function will remove it without removing values.
-			if lic not in self.liclist and lic != "||":
-				self.qatracker.add_error(
-					"LICENSE.invalid",
-					package + "/" + y_ebuild + ".ebuild: %s" % lic)
-			elif lic in self.liclist_deprecated:
-				self.qatracker.add_error(
-					"LICENSE.deprecated",
-					"%s: %s" % (ebuild.relative_path, lic))

diff --git a/pym/repoman/modules/scan/metadata/__init__.py b/pym/repoman/modules/scan/metadata/__init__.py
index 83aac7f..c8f3609 100644
--- a/pym/repoman/modules/scan/metadata/__init__.py
+++ b/pym/repoman/modules/scan/metadata/__init__.py
@@ -37,6 +37,15 @@ module_spec = {
 			'func_desc': {
 			},
 		},
+		'license-metadata': {
+			'name': "license",
+			'sourcefile': "license",
+			'class': "LicenseChecks",
+			'description': doc,
+			'functions': ['check'],
+			'func_desc': {
+			},
+		},
 	}
 }
 

diff --git a/pym/repoman/modules/scan/metadata/license.py b/pym/repoman/modules/scan/metadata/license.py
new file mode 100644
index 0000000..b022b20
--- /dev/null
+++ b/pym/repoman/modules/scan/metadata/license.py
@@ -0,0 +1,53 @@
+
+'''license.py
+Perform checks on the LICENSE variable.
+'''
+
+# import our initialized portage instance
+from repoman._portage import portage
+
+
+class LicenseChecks(object):
+	'''Perform checks on the LICENSE variable.'''
+
+	def __init__(self, **kwargs):
+		'''
+		@param qatracker: QATracker instance
+		@param repo_metadata: dictionary of various repository items.
+		'''
+		self.qatracker = kwargs.get('qatracker')
+		self.repo_metadata = kwargs.get('repo_metadata')
+
+	def check(self, **kwargs):
+		'''
+		@param xpkg: Package in which we check (string).
+		@param ebuild: Ebuild which we check (object).
+		@param y_ebuild: Ebuild which we check (string).
+		'''
+		xpkg = kwargs.get('xpkg')
+		ebuild = kwargs.get('ebuild')
+		y_ebuild = kwargs.get('y_ebuild')
+		if not kwargs.get('badlicsyntax'):
+			# Parse the LICENSE variable, remove USE conditions and flatten it.
+			licenses = portage.dep.use_reduce(
+				ebuild.metadata["LICENSE"], matchall=1, flat=True)
+
+			# Check each entry to ensure that it exists in ${PORTDIR}/licenses/.
+			for lic in licenses:
+				# Need to check for "||" manually as no portage
+				# function will remove it without removing values.
+				if lic not in self.repo_metadata['liclist'] and lic != "||":
+					self.qatracker.add_error("LICENSE.invalid",
+						"%s/%s.ebuild: %s" % (xpkg, y_ebuild, lic))
+				elif lic in self.repo_metadata['lic_deprecated']:
+					self.qatracker.add_error("LICENSE.deprecated",
+						"%s: %s" % (ebuild.relative_path, lic))
+		return {'continue': False}
+
+	@property
+	def runInPkgs(self):
+		return (False, [])
+
+	@property
+	def runInEbuilds(self):
+		return (True, [self.check])

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index d5faded..1f792bd 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -18,7 +18,6 @@ from portage import _unicode_encode
 from portage.dep import Atom
 from portage.output import green
 from repoman.checks.ebuilds.checks import run_checks
-from repoman.checks.ebuilds.variables.license import LicenseChecks
 from repoman.checks.ebuilds.variables.restrict import RestrictChecks
 from repoman.modules.commit import repochecks
 from repoman.profile import check_profiles, dev_profile_keywords, setup_profile
@@ -210,7 +209,6 @@ class Scanner(object):
 			self.modules[mod_class.__name__] = mod_class(**self.kwargs)
 
 		# initialize our checks classes here before the big xpkg loop
-		self.licensecheck = LicenseChecks(self.qatracker, liclist, liclist_deprecated)
 		self.restrictcheck = RestrictChecks(self.qatracker)
 
 
@@ -297,6 +295,7 @@ class Scanner(object):
 				('description', 'DescriptionChecks'), (None, 'KeywordChecks'),
 				('arches', 'ArchChecks'), ('depend', 'DependChecks'),
 				('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
+				('license', 'LicenseChecks'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -324,10 +323,6 @@ class Scanner(object):
 			if y_ebuild_continue:
 				continue
 
-			# license checks
-			if not dynamic_data['badlicsyntax']:
-				self.licensecheck.check(dynamic_data['pkg'], xpkg, dynamic_data['ebuild'], y_ebuild)
-
 			self.restrictcheck.check(dynamic_data['pkg'], xpkg, dynamic_data['ebuild'], y_ebuild)
 
 			# Syntax Checks


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/checks/ebuilds/variables/, pym/repoman/modules/scan/metadata/, ...
@ 2016-01-31 20:03 Brian Dolbec
  0 siblings, 0 replies; 7+ messages in thread
From: Brian Dolbec @ 2016-01-31 20:03 UTC (permalink / raw
  To: gentoo-commits

commit:     3d9d113df9eae165c6b1ecaeda0601708ad8a8df
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  3 17:36:26 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Jan 30 20:25:06 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=3d9d113d

repoman: Migrate DescriptionChecks to the plugin system

 pym/repoman/modules/scan/metadata/__init__.py        |  9 +++++++++
 .../scan/metadata}/description.py                    | 20 ++++++++++++++------
 pym/repoman/scanner.py                               |  5 +----
 3 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/pym/repoman/modules/scan/metadata/__init__.py b/pym/repoman/modules/scan/metadata/__init__.py
index bacedf5..83aac7f 100644
--- a/pym/repoman/modules/scan/metadata/__init__.py
+++ b/pym/repoman/modules/scan/metadata/__init__.py
@@ -28,6 +28,15 @@ module_spec = {
 			'func_desc': {
 			},
 		},
+		'description-metadata': {
+			'name': "description",
+			'sourcefile': "description",
+			'class': "DescriptionChecks",
+			'description': doc,
+			'functions': ['check'],
+			'func_desc': {
+			},
+		},
 	}
 }
 

diff --git a/pym/repoman/checks/ebuilds/variables/description.py b/pym/repoman/modules/scan/metadata/description.py
similarity index 66%
rename from pym/repoman/checks/ebuilds/variables/description.py
rename to pym/repoman/modules/scan/metadata/description.py
index a2b1057..3570607 100644
--- a/pym/repoman/checks/ebuilds/variables/description.py
+++ b/pym/repoman/modules/scan/metadata/description.py
@@ -9,20 +9,19 @@ from repoman.qa_data import max_desc_len
 class DescriptionChecks(object):
 	'''Perform checks on the DESCRIPTION variable.'''
 
-	def __init__(self, qatracker):
+	def __init__(self, **kwargs):
 		'''
 		@param qatracker: QATracker instance
 		'''
-		self.qatracker = qatracker
+		self.qatracker = kwargs.get('qatracker')
 
-	def check(self, pkg, ebuild):
+	def checkTooLong(self, **kwargs):
 		'''
 		@param pkg: Package in which we check (object).
 		@param ebuild: Ebuild which we check (object).
 		'''
-		self._checkTooLong(pkg, ebuild)
-
-	def _checkTooLong(self, pkg, ebuild):
+		ebuild = kwargs.get('ebuild')
+		pkg = kwargs.get('pkg')
 		# 14 is the length of DESCRIPTION=""
 		if len(pkg._metadata['DESCRIPTION']) > max_desc_len:
 			self.qatracker.add_error(
@@ -30,3 +29,12 @@ class DescriptionChecks(object):
 				"%s: DESCRIPTION is %d characters (max %d)" %
 				(ebuild.relative_path, len(
 					pkg._metadata['DESCRIPTION']), max_desc_len))
+		return {'continue': False}
+
+	@property
+	def runInPkgs(self):
+		return (False, [])
+
+	@property
+	def runInEbuilds(self):
+		return (True, [self.checkTooLong])

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 6321f0b..f4c21d0 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -21,7 +21,6 @@ from repoman.checks.ebuilds.checks import run_checks
 from repoman.checks.ebuilds.eclasses.ruby import RubyEclassChecks
 from repoman.check_missingslot import check_missingslot
 from repoman.checks.ebuilds.use_flags import USEFlagChecks
-from repoman.checks.ebuilds.variables.description import DescriptionChecks
 from repoman.checks.ebuilds.variables.license import LicenseChecks
 from repoman.checks.ebuilds.variables.restrict import RestrictChecks
 from repoman.modules.commit import repochecks
@@ -219,7 +218,6 @@ class Scanner(object):
 		# initialize our checks classes here before the big xpkg loop
 		self.use_flag_checks = USEFlagChecks(self.qatracker, uselist)
 		self.rubyeclasscheck = RubyEclassChecks(self.qatracker)
-		self.descriptioncheck = DescriptionChecks(self.qatracker)
 		self.licensecheck = LicenseChecks(self.qatracker, liclist, liclist_deprecated)
 		self.restrictcheck = RestrictChecks(self.qatracker)
 
@@ -304,6 +302,7 @@ class Scanner(object):
 			for mod in [('ebuild', 'Ebuild'), ('live', 'LiveEclassChecks'),
 				('eapi', 'EAPIChecks'), ('ebuild_metadata', 'EbuildMetadata'),
 				('thirdpartymirrors', 'ThirdPartyMirrors'),
+				('description', 'DescriptionChecks'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -350,8 +349,6 @@ class Scanner(object):
 						myqakey = var + ".virtual"
 						self.qatracker.add_error(myqakey, dynamic_data['ebuild'].relative_path)
 
-			self.descriptioncheck.check(dynamic_data['pkg'], dynamic_data['ebuild'])
-
 			if dynamic_data['live_ebuild'] and self.repo_settings.repo_config.name == "gentoo":
 				self.liveeclasscheck.check(
 					dynamic_data['pkg'], xpkg, dynamic_data['ebuild'], y_ebuild, dynamic_data['ebuild'].keywords, self.repo_metadata['pmaskdict'])


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/checks/ebuilds/variables/, pym/repoman/modules/scan/metadata/, ...
@ 2016-01-31 20:03 Brian Dolbec
  0 siblings, 0 replies; 7+ messages in thread
From: Brian Dolbec @ 2016-01-31 20:03 UTC (permalink / raw
  To: gentoo-commits

commit:     3405ed487c2d9788ff575f3d20e25fb8d7f086aa
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  3 23:09:27 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Jan 30 20:25:22 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=3405ed48

repoman: Migrate license checks to a plugin module

 pym/repoman/checks/ebuilds/variables/license.py | 47 ----------------------
 pym/repoman/modules/scan/metadata/__init__.py   |  9 +++++
 pym/repoman/modules/scan/metadata/license.py    | 53 +++++++++++++++++++++++++
 pym/repoman/scanner.py                          |  7 +---
 4 files changed, 63 insertions(+), 53 deletions(-)

diff --git a/pym/repoman/checks/ebuilds/variables/license.py b/pym/repoman/checks/ebuilds/variables/license.py
deleted file mode 100644
index bdc859c..0000000
--- a/pym/repoman/checks/ebuilds/variables/license.py
+++ /dev/null
@@ -1,47 +0,0 @@
-
-'''description.py
-Perform checks on the LICENSE variable.
-'''
-
-# import our initialized portage instance
-from repoman._portage import portage
-
-
-class LicenseChecks(object):
-	'''Perform checks on the LICENSE variable.'''
-
-	def __init__(self, qatracker, liclist, liclist_deprecated):
-		'''
-		@param qatracker: QATracker instance
-		@param liclist: List of licenses.
-		@param liclist: List of deprecated licenses.
-		'''
-		self.qatracker = qatracker
-		self.liclist = liclist
-		self.liclist_deprecated = liclist_deprecated
-
-	def check(
-		self, pkg, package, ebuild, y_ebuild):
-		'''
-		@param pkg: Package in which we check (object).
-		@param package: Package in which we check (string).
-		@param ebuild: Ebuild which we check (object).
-		@param y_ebuild: Ebuild which we check (string).
-		'''
-
-		# Parse the LICENSE variable, remove USE conditions and flatten it.
-		licenses = portage.dep.use_reduce(
-			pkg._metadata["LICENSE"], matchall=1, flat=True)
-
-		# Check each entry to ensure that it exists in ${PORTDIR}/licenses/.
-		for lic in licenses:
-			# Need to check for "||" manually as no portage
-			# function will remove it without removing values.
-			if lic not in self.liclist and lic != "||":
-				self.qatracker.add_error(
-					"LICENSE.invalid",
-					package + "/" + y_ebuild + ".ebuild: %s" % lic)
-			elif lic in self.liclist_deprecated:
-				self.qatracker.add_error(
-					"LICENSE.deprecated",
-					"%s: %s" % (ebuild.relative_path, lic))

diff --git a/pym/repoman/modules/scan/metadata/__init__.py b/pym/repoman/modules/scan/metadata/__init__.py
index 83aac7f..c8f3609 100644
--- a/pym/repoman/modules/scan/metadata/__init__.py
+++ b/pym/repoman/modules/scan/metadata/__init__.py
@@ -37,6 +37,15 @@ module_spec = {
 			'func_desc': {
 			},
 		},
+		'license-metadata': {
+			'name': "license",
+			'sourcefile': "license",
+			'class': "LicenseChecks",
+			'description': doc,
+			'functions': ['check'],
+			'func_desc': {
+			},
+		},
 	}
 }
 

diff --git a/pym/repoman/modules/scan/metadata/license.py b/pym/repoman/modules/scan/metadata/license.py
new file mode 100644
index 0000000..b022b20
--- /dev/null
+++ b/pym/repoman/modules/scan/metadata/license.py
@@ -0,0 +1,53 @@
+
+'''license.py
+Perform checks on the LICENSE variable.
+'''
+
+# import our initialized portage instance
+from repoman._portage import portage
+
+
+class LicenseChecks(object):
+	'''Perform checks on the LICENSE variable.'''
+
+	def __init__(self, **kwargs):
+		'''
+		@param qatracker: QATracker instance
+		@param repo_metadata: dictionary of various repository items.
+		'''
+		self.qatracker = kwargs.get('qatracker')
+		self.repo_metadata = kwargs.get('repo_metadata')
+
+	def check(self, **kwargs):
+		'''
+		@param xpkg: Package in which we check (string).
+		@param ebuild: Ebuild which we check (object).
+		@param y_ebuild: Ebuild which we check (string).
+		'''
+		xpkg = kwargs.get('xpkg')
+		ebuild = kwargs.get('ebuild')
+		y_ebuild = kwargs.get('y_ebuild')
+		if not kwargs.get('badlicsyntax'):
+			# Parse the LICENSE variable, remove USE conditions and flatten it.
+			licenses = portage.dep.use_reduce(
+				ebuild.metadata["LICENSE"], matchall=1, flat=True)
+
+			# Check each entry to ensure that it exists in ${PORTDIR}/licenses/.
+			for lic in licenses:
+				# Need to check for "||" manually as no portage
+				# function will remove it without removing values.
+				if lic not in self.repo_metadata['liclist'] and lic != "||":
+					self.qatracker.add_error("LICENSE.invalid",
+						"%s/%s.ebuild: %s" % (xpkg, y_ebuild, lic))
+				elif lic in self.repo_metadata['lic_deprecated']:
+					self.qatracker.add_error("LICENSE.deprecated",
+						"%s: %s" % (ebuild.relative_path, lic))
+		return {'continue': False}
+
+	@property
+	def runInPkgs(self):
+		return (False, [])
+
+	@property
+	def runInEbuilds(self):
+		return (True, [self.check])

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 9b42696..8d83cac 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -18,7 +18,6 @@ from portage import _unicode_encode
 from portage.dep import Atom
 from portage.output import green
 from repoman.checks.ebuilds.checks import run_checks
-from repoman.checks.ebuilds.variables.license import LicenseChecks
 from repoman.checks.ebuilds.variables.restrict import RestrictChecks
 from repoman.modules.commit import repochecks
 from repoman.profile import check_profiles, dev_profile_keywords, setup_profile
@@ -213,7 +212,6 @@ class Scanner(object):
 			self.modules[mod_class.__name__] = mod_class(**self.kwargs)
 
 		# initialize our checks classes here before the big xpkg loop
-		self.licensecheck = LicenseChecks(self.qatracker, liclist, liclist_deprecated)
 		self.restrictcheck = RestrictChecks(self.qatracker)
 
 
@@ -300,6 +298,7 @@ class Scanner(object):
 				('description', 'DescriptionChecks'), (None, 'KeywordChecks'),
 				('arches', 'ArchChecks'), ('depend', 'DependChecks'),
 				('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
+				('license', 'LicenseChecks'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -327,10 +326,6 @@ class Scanner(object):
 			if y_ebuild_continue:
 				continue
 
-			# license checks
-			if not dynamic_data['badlicsyntax']:
-				self.licensecheck.check(dynamic_data['pkg'], xpkg, dynamic_data['ebuild'], y_ebuild)
-
 			self.restrictcheck.check(dynamic_data['pkg'], xpkg, dynamic_data['ebuild'], y_ebuild)
 
 			# Syntax Checks


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-01-31 20:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-23  1:42 [gentoo-commits] proj/portage:repoman commit in: pym/repoman/checks/ebuilds/variables/, pym/repoman/modules/scan/metadata/, Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2016-01-31 20:03 Brian Dolbec
2016-01-31 20:03 Brian Dolbec
2016-01-11  8:01 Brian Dolbec
2016-01-11  8:01 Brian Dolbec
2016-01-10  3:26 Brian Dolbec
2016-01-06  4:21 Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox