public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/
@ 2016-01-10 20:17 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2016-01-10 20:17 UTC (permalink / raw
  To: gentoo-commits

commit:     9404bbfa1a596a93f37fd29bb8ee559358e10d12
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  4 07:55:55 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sun Jan 10 20:15:08 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=9404bbfa

repoman: Create a new Options class plugin

This handles an options.force bypass using the is_forced() from withing the plugin system.

 pym/repoman/modules/scan/options/__init__.py | 23 +++++++++++++++++++++++
 pym/repoman/modules/scan/options/options.py  | 22 ++++++++++++++++++++++
 pym/repoman/scanner.py                       | 10 ++--------
 3 files changed, 47 insertions(+), 8 deletions(-)

diff --git a/pym/repoman/modules/scan/options/__init__.py b/pym/repoman/modules/scan/options/__init__.py
new file mode 100644
index 0000000..8424058
--- /dev/null
+++ b/pym/repoman/modules/scan/options/__init__.py
@@ -0,0 +1,23 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Options plug-in module for repoman.
+Performs option related actions on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'options',
+	'description': doc,
+	'provides':{
+		'options-module': {
+			'name': "options",
+			'class': "Options",
+			'description': doc,
+			'functions': ['is_forced'],
+			'func_desc': {
+			},
+		},
+	}
+}
+

diff --git a/pym/repoman/modules/scan/options/options.py b/pym/repoman/modules/scan/options/options.py
new file mode 100644
index 0000000..b592884
--- /dev/null
+++ b/pym/repoman/modules/scan/options/options.py
@@ -0,0 +1,22 @@
+
+
+class Options(object):
+
+	def __init__(self, **kwargs):
+		self.options = kwargs.get('options')
+
+	def is_forced(self, **kwargs):
+		if self.options.force:
+			# The dep_check() calls are the most expensive QA test. If --force
+			# is enabled, there's no point in wasting time on these since the
+			# user is intent on forcing the commit anyway.
+			return {'continue': True}
+		return {'continue': False}
+
+	@property
+	def runInPkgs(self):
+		return (False, [])
+
+	@property
+	def runInEbuilds(self):
+		return (True, [self.is_forced])

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index ac77d1f..a047237 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -290,6 +290,8 @@ class Scanner(object):
 				('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
 				('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
 				('mtime', 'MtimeChecks'), ('encoding', 'EncodingCheck'),
+				# Options.is_forced() is used to bypass further checks
+				('options', 'Options'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -317,14 +319,6 @@ class Scanner(object):
 			if y_ebuild_continue:
 				continue
 
-			# Syntax Checks
-
-			if self.options.force:
-				# The dep_check() calls are the most expensive QA test. If --force
-				# is enabled, there's no point in wasting time on these since the
-				# user is intent on forcing the commit anyway.
-				continue
-
 			relevant_profiles = []
 			for keyword, arch, groups in dynamic_data['arches']:
 				if arch not in self.profiles:


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

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

commit:     40c2bdf3d00f05d9bcbf74796c460e909eea4742
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  4 07:55:55 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon Jan 11 08:00:19 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=40c2bdf3

repoman: Create a new Options class plugin

This handles an options.force bypass using the is_forced() from withing the plugin system.

 pym/repoman/modules/scan/options/__init__.py | 23 +++++++++++++++++++++++
 pym/repoman/modules/scan/options/options.py  | 22 ++++++++++++++++++++++
 pym/repoman/scanner.py                       | 10 ++--------
 3 files changed, 47 insertions(+), 8 deletions(-)

diff --git a/pym/repoman/modules/scan/options/__init__.py b/pym/repoman/modules/scan/options/__init__.py
new file mode 100644
index 0000000..8424058
--- /dev/null
+++ b/pym/repoman/modules/scan/options/__init__.py
@@ -0,0 +1,23 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Options plug-in module for repoman.
+Performs option related actions on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'options',
+	'description': doc,
+	'provides':{
+		'options-module': {
+			'name': "options",
+			'class': "Options",
+			'description': doc,
+			'functions': ['is_forced'],
+			'func_desc': {
+			},
+		},
+	}
+}
+

diff --git a/pym/repoman/modules/scan/options/options.py b/pym/repoman/modules/scan/options/options.py
new file mode 100644
index 0000000..b592884
--- /dev/null
+++ b/pym/repoman/modules/scan/options/options.py
@@ -0,0 +1,22 @@
+
+
+class Options(object):
+
+	def __init__(self, **kwargs):
+		self.options = kwargs.get('options')
+
+	def is_forced(self, **kwargs):
+		if self.options.force:
+			# The dep_check() calls are the most expensive QA test. If --force
+			# is enabled, there's no point in wasting time on these since the
+			# user is intent on forcing the commit anyway.
+			return {'continue': True}
+		return {'continue': False}
+
+	@property
+	def runInPkgs(self):
+		return (False, [])
+
+	@property
+	def runInEbuilds(self):
+		return (True, [self.is_forced])

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index ac77d1f..a047237 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -290,6 +290,8 @@ class Scanner(object):
 				('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
 				('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
 				('mtime', 'MtimeChecks'), ('encoding', 'EncodingCheck'),
+				# Options.is_forced() is used to bypass further checks
+				('options', 'Options'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -317,14 +319,6 @@ class Scanner(object):
 			if y_ebuild_continue:
 				continue
 
-			# Syntax Checks
-
-			if self.options.force:
-				# The dep_check() calls are the most expensive QA test. If --force
-				# is enabled, there's no point in wasting time on these since the
-				# user is intent on forcing the commit anyway.
-				continue
-
 			relevant_profiles = []
 			for keyword, arch, groups in dynamic_data['arches']:
 				if arch not in self.profiles:


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

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

commit:     f433f39038dc27807dcb99fc94f12ea0fcb380ec
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  4 07:55:55 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Jan 23 01:35:17 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=f433f390

repoman: Create a new Options class plugin

This handles an options.force bypass using the is_forced() from withing the plugin system.

 pym/repoman/modules/scan/options/__init__.py | 24 ++++++++++++++++++++++++
 pym/repoman/modules/scan/options/options.py  | 22 ++++++++++++++++++++++
 pym/repoman/scanner.py                       | 10 ++--------
 3 files changed, 48 insertions(+), 8 deletions(-)

diff --git a/pym/repoman/modules/scan/options/__init__.py b/pym/repoman/modules/scan/options/__init__.py
new file mode 100644
index 0000000..2d3d9d2
--- /dev/null
+++ b/pym/repoman/modules/scan/options/__init__.py
@@ -0,0 +1,24 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Options plug-in module for repoman.
+Performs option related actions on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'options',
+	'description': doc,
+	'provides':{
+		'options-module': {
+			'name': "options",
+			'sourcefile': "options",
+			'class': "Options",
+			'description': doc,
+			'functions': ['is_forced'],
+			'func_desc': {
+			},
+		},
+	}
+}
+

diff --git a/pym/repoman/modules/scan/options/options.py b/pym/repoman/modules/scan/options/options.py
new file mode 100644
index 0000000..b592884
--- /dev/null
+++ b/pym/repoman/modules/scan/options/options.py
@@ -0,0 +1,22 @@
+
+
+class Options(object):
+
+	def __init__(self, **kwargs):
+		self.options = kwargs.get('options')
+
+	def is_forced(self, **kwargs):
+		if self.options.force:
+			# The dep_check() calls are the most expensive QA test. If --force
+			# is enabled, there's no point in wasting time on these since the
+			# user is intent on forcing the commit anyway.
+			return {'continue': True}
+		return {'continue': False}
+
+	@property
+	def runInPkgs(self):
+		return (False, [])
+
+	@property
+	def runInEbuilds(self):
+		return (True, [self.is_forced])

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 6603bd2..cb2a7c0 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -290,6 +290,8 @@ class Scanner(object):
 				('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
 				('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
 				('mtime', 'MtimeChecks'), ('multicheck', 'MultiCheck'),
+				# Options.is_forced() is used to bypass further checks
+				('options', 'Options'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -317,14 +319,6 @@ class Scanner(object):
 			if y_ebuild_continue:
 				continue
 
-			# Syntax Checks
-
-			if self.options.force:
-				# The dep_check() calls are the most expensive QA test. If --force
-				# is enabled, there's no point in wasting time on these since the
-				# user is intent on forcing the commit anyway.
-				continue
-
 			relevant_profiles = []
 			for keyword, arch, groups in dynamic_data['arches']:
 				if arch not in self.profiles:


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

* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/
@ 2016-01-27 23:15 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2016-01-27 23:15 UTC (permalink / raw
  To: gentoo-commits

commit:     a4c6c0735dfebfafa3c1418e8517e482cd2e76e8
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  4 07:55:55 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Jan 27 22:44:24 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=a4c6c073

repoman: Create a new Options class plugin

This handles an options.force bypass using the is_forced() from withing the plugin system.

 pym/repoman/modules/scan/options/__init__.py | 24 ++++++++++++++++++++++++
 pym/repoman/modules/scan/options/options.py  | 22 ++++++++++++++++++++++
 pym/repoman/scanner.py                       | 10 ++--------
 3 files changed, 48 insertions(+), 8 deletions(-)

diff --git a/pym/repoman/modules/scan/options/__init__.py b/pym/repoman/modules/scan/options/__init__.py
new file mode 100644
index 0000000..2d3d9d2
--- /dev/null
+++ b/pym/repoman/modules/scan/options/__init__.py
@@ -0,0 +1,24 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Options plug-in module for repoman.
+Performs option related actions on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'options',
+	'description': doc,
+	'provides':{
+		'options-module': {
+			'name': "options",
+			'sourcefile': "options",
+			'class': "Options",
+			'description': doc,
+			'functions': ['is_forced'],
+			'func_desc': {
+			},
+		},
+	}
+}
+

diff --git a/pym/repoman/modules/scan/options/options.py b/pym/repoman/modules/scan/options/options.py
new file mode 100644
index 0000000..b592884
--- /dev/null
+++ b/pym/repoman/modules/scan/options/options.py
@@ -0,0 +1,22 @@
+
+
+class Options(object):
+
+	def __init__(self, **kwargs):
+		self.options = kwargs.get('options')
+
+	def is_forced(self, **kwargs):
+		if self.options.force:
+			# The dep_check() calls are the most expensive QA test. If --force
+			# is enabled, there's no point in wasting time on these since the
+			# user is intent on forcing the commit anyway.
+			return {'continue': True}
+		return {'continue': False}
+
+	@property
+	def runInPkgs(self):
+		return (False, [])
+
+	@property
+	def runInEbuilds(self):
+		return (True, [self.is_forced])

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 54aeb49..50e9752 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -293,6 +293,8 @@ class Scanner(object):
 				('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
 				('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
 				('mtime', 'MtimeChecks'), ('multicheck', 'MultiCheck'),
+				# Options.is_forced() is used to bypass further checks
+				('options', 'Options'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -320,14 +322,6 @@ class Scanner(object):
 			if y_ebuild_continue:
 				continue
 
-			# Syntax Checks
-
-			if self.options.force:
-				# The dep_check() calls are the most expensive QA test. If --force
-				# is enabled, there's no point in wasting time on these since the
-				# user is intent on forcing the commit anyway.
-				continue
-
 			relevant_profiles = []
 			for keyword, arch, groups in dynamic_data['arches']:
 				if arch not in self.profiles:


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

* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/
@ 2016-01-29  5:01 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2016-01-29  5:01 UTC (permalink / raw
  To: gentoo-commits

commit:     0eb28fa99d79bdf0b434524eeb7c52f87deb733f
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  4 07:55:55 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Jan 29 04:52:59 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=0eb28fa9

repoman: Create a new Options class plugin

This handles an options.force bypass using the is_forced() from withing the plugin system.

 pym/repoman/modules/scan/options/__init__.py | 24 ++++++++++++++++++++++++
 pym/repoman/modules/scan/options/options.py  | 22 ++++++++++++++++++++++
 pym/repoman/scanner.py                       | 10 ++--------
 3 files changed, 48 insertions(+), 8 deletions(-)

diff --git a/pym/repoman/modules/scan/options/__init__.py b/pym/repoman/modules/scan/options/__init__.py
new file mode 100644
index 0000000..2d3d9d2
--- /dev/null
+++ b/pym/repoman/modules/scan/options/__init__.py
@@ -0,0 +1,24 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Options plug-in module for repoman.
+Performs option related actions on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'options',
+	'description': doc,
+	'provides':{
+		'options-module': {
+			'name': "options",
+			'sourcefile': "options",
+			'class': "Options",
+			'description': doc,
+			'functions': ['is_forced'],
+			'func_desc': {
+			},
+		},
+	}
+}
+

diff --git a/pym/repoman/modules/scan/options/options.py b/pym/repoman/modules/scan/options/options.py
new file mode 100644
index 0000000..b592884
--- /dev/null
+++ b/pym/repoman/modules/scan/options/options.py
@@ -0,0 +1,22 @@
+
+
+class Options(object):
+
+	def __init__(self, **kwargs):
+		self.options = kwargs.get('options')
+
+	def is_forced(self, **kwargs):
+		if self.options.force:
+			# The dep_check() calls are the most expensive QA test. If --force
+			# is enabled, there's no point in wasting time on these since the
+			# user is intent on forcing the commit anyway.
+			return {'continue': True}
+		return {'continue': False}
+
+	@property
+	def runInPkgs(self):
+		return (False, [])
+
+	@property
+	def runInEbuilds(self):
+		return (True, [self.is_forced])

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 54aeb49..50e9752 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -293,6 +293,8 @@ class Scanner(object):
 				('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
 				('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
 				('mtime', 'MtimeChecks'), ('multicheck', 'MultiCheck'),
+				# Options.is_forced() is used to bypass further checks
+				('options', 'Options'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -320,14 +322,6 @@ class Scanner(object):
 			if y_ebuild_continue:
 				continue
 
-			# Syntax Checks
-
-			if self.options.force:
-				# The dep_check() calls are the most expensive QA test. If --force
-				# is enabled, there's no point in wasting time on these since the
-				# user is intent on forcing the commit anyway.
-				continue
-
 			relevant_profiles = []
 			for keyword, arch, groups in dynamic_data['arches']:
 				if arch not in self.profiles:


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

* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/
@ 2016-01-30  6:58 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2016-01-30  6:58 UTC (permalink / raw
  To: gentoo-commits

commit:     075a66c9092b54e0846e494a2b7f92f5d981f957
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  4 07:55:55 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Jan 30 06:51:57 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=075a66c9

repoman: Create a new Options class plugin

This handles an options.force bypass using the is_forced() from withing the plugin system.

 pym/repoman/modules/scan/options/__init__.py | 24 ++++++++++++++++++++++++
 pym/repoman/modules/scan/options/options.py  | 22 ++++++++++++++++++++++
 pym/repoman/scanner.py                       | 10 ++--------
 3 files changed, 48 insertions(+), 8 deletions(-)

diff --git a/pym/repoman/modules/scan/options/__init__.py b/pym/repoman/modules/scan/options/__init__.py
new file mode 100644
index 0000000..2d3d9d2
--- /dev/null
+++ b/pym/repoman/modules/scan/options/__init__.py
@@ -0,0 +1,24 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Options plug-in module for repoman.
+Performs option related actions on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'options',
+	'description': doc,
+	'provides':{
+		'options-module': {
+			'name': "options",
+			'sourcefile': "options",
+			'class': "Options",
+			'description': doc,
+			'functions': ['is_forced'],
+			'func_desc': {
+			},
+		},
+	}
+}
+

diff --git a/pym/repoman/modules/scan/options/options.py b/pym/repoman/modules/scan/options/options.py
new file mode 100644
index 0000000..b592884
--- /dev/null
+++ b/pym/repoman/modules/scan/options/options.py
@@ -0,0 +1,22 @@
+
+
+class Options(object):
+
+	def __init__(self, **kwargs):
+		self.options = kwargs.get('options')
+
+	def is_forced(self, **kwargs):
+		if self.options.force:
+			# The dep_check() calls are the most expensive QA test. If --force
+			# is enabled, there's no point in wasting time on these since the
+			# user is intent on forcing the commit anyway.
+			return {'continue': True}
+		return {'continue': False}
+
+	@property
+	def runInPkgs(self):
+		return (False, [])
+
+	@property
+	def runInEbuilds(self):
+		return (True, [self.is_forced])

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 9fe5f26..b9c53a0 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -291,6 +291,8 @@ class Scanner(object):
 				('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
 				('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
 				('mtime', 'MtimeChecks'), ('multicheck', 'MultiCheck'),
+				# Options.is_forced() is used to bypass further checks
+				('options', 'Options'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -318,14 +320,6 @@ class Scanner(object):
 			if y_ebuild_continue:
 				continue
 
-			# Syntax Checks
-
-			if self.options.force:
-				# The dep_check() calls are the most expensive QA test. If --force
-				# is enabled, there's no point in wasting time on these since the
-				# user is intent on forcing the commit anyway.
-				continue
-
 			relevant_profiles = []
 			for keyword, arch, groups in dynamic_data['arches']:
 				if arch not in self.profiles:


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

* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/
@ 2016-01-30  8:00 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2016-01-30  8:00 UTC (permalink / raw
  To: gentoo-commits

commit:     926a641c8fd26eba5a85d3f372682e61d06dc50d
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  4 07:55:55 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Jan 30 07:50:20 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=926a641c

repoman: Create a new Options class plugin

This handles an options.force bypass using the is_forced() from withing the plugin system.

 pym/repoman/modules/scan/options/__init__.py | 24 ++++++++++++++++++++++++
 pym/repoman/modules/scan/options/options.py  | 22 ++++++++++++++++++++++
 pym/repoman/scanner.py                       | 10 ++--------
 3 files changed, 48 insertions(+), 8 deletions(-)

diff --git a/pym/repoman/modules/scan/options/__init__.py b/pym/repoman/modules/scan/options/__init__.py
new file mode 100644
index 0000000..2d3d9d2
--- /dev/null
+++ b/pym/repoman/modules/scan/options/__init__.py
@@ -0,0 +1,24 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Options plug-in module for repoman.
+Performs option related actions on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'options',
+	'description': doc,
+	'provides':{
+		'options-module': {
+			'name': "options",
+			'sourcefile': "options",
+			'class': "Options",
+			'description': doc,
+			'functions': ['is_forced'],
+			'func_desc': {
+			},
+		},
+	}
+}
+

diff --git a/pym/repoman/modules/scan/options/options.py b/pym/repoman/modules/scan/options/options.py
new file mode 100644
index 0000000..b592884
--- /dev/null
+++ b/pym/repoman/modules/scan/options/options.py
@@ -0,0 +1,22 @@
+
+
+class Options(object):
+
+	def __init__(self, **kwargs):
+		self.options = kwargs.get('options')
+
+	def is_forced(self, **kwargs):
+		if self.options.force:
+			# The dep_check() calls are the most expensive QA test. If --force
+			# is enabled, there's no point in wasting time on these since the
+			# user is intent on forcing the commit anyway.
+			return {'continue': True}
+		return {'continue': False}
+
+	@property
+	def runInPkgs(self):
+		return (False, [])
+
+	@property
+	def runInEbuilds(self):
+		return (True, [self.is_forced])

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 9fe5f26..b9c53a0 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -291,6 +291,8 @@ class Scanner(object):
 				('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
 				('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
 				('mtime', 'MtimeChecks'), ('multicheck', 'MultiCheck'),
+				# Options.is_forced() is used to bypass further checks
+				('options', 'Options'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -318,14 +320,6 @@ class Scanner(object):
 			if y_ebuild_continue:
 				continue
 
-			# Syntax Checks
-
-			if self.options.force:
-				# The dep_check() calls are the most expensive QA test. If --force
-				# is enabled, there's no point in wasting time on these since the
-				# user is intent on forcing the commit anyway.
-				continue
-
 			relevant_profiles = []
 			for keyword, arch, groups in dynamic_data['arches']:
 				if arch not in self.profiles:


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

* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/
@ 2016-03-07 21:53 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2016-03-07 21:53 UTC (permalink / raw
  To: gentoo-commits

commit:     2290fc1382ac8051f595187bda03dc25fcb3b6fb
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  4 07:55:55 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon Mar  7 21:21:11 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=2290fc13

repoman: Create a new Options class plugin

This handles an options.force bypass using the is_forced() from withing the plugin system.

 pym/repoman/modules/scan/options/__init__.py | 24 ++++++++++++++++++++++++
 pym/repoman/modules/scan/options/options.py  | 18 ++++++++++++++++++
 pym/repoman/scanner.py                       | 10 ++--------
 3 files changed, 44 insertions(+), 8 deletions(-)

diff --git a/pym/repoman/modules/scan/options/__init__.py b/pym/repoman/modules/scan/options/__init__.py
new file mode 100644
index 0000000..2d3d9d2
--- /dev/null
+++ b/pym/repoman/modules/scan/options/__init__.py
@@ -0,0 +1,24 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Options plug-in module for repoman.
+Performs option related actions on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'options',
+	'description': doc,
+	'provides':{
+		'options-module': {
+			'name': "options",
+			'sourcefile': "options",
+			'class': "Options",
+			'description': doc,
+			'functions': ['is_forced'],
+			'func_desc': {
+			},
+		},
+	}
+}
+

diff --git a/pym/repoman/modules/scan/options/options.py b/pym/repoman/modules/scan/options/options.py
new file mode 100644
index 0000000..c2546d6
--- /dev/null
+++ b/pym/repoman/modules/scan/options/options.py
@@ -0,0 +1,18 @@
+
+
+class Options(object):
+
+	def __init__(self, **kwargs):
+		self.options = kwargs.get('options')
+
+	def is_forced(self, **kwargs):
+		if self.options.force:
+			# The dep_check() calls are the most expensive QA test. If --force
+			# is enabled, there's no point in wasting time on these since the
+			# user is intent on forcing the commit anyway.
+			return {'continue': True}
+		return {'continue': False}
+
+	@property
+	def runInEbuilds(self):
+		return (True, [self.is_forced])

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 78ff053..2625de4 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -291,6 +291,8 @@ class Scanner(object):
 				('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
 				('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
 				('mtime', 'MtimeChecks'), ('multicheck', 'MultiCheck'),
+				# Options.is_forced() is used to bypass further checks
+				('options', 'Options'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -318,14 +320,6 @@ class Scanner(object):
 			if y_ebuild_continue:
 				continue
 
-			# Syntax Checks
-
-			if self.options.force:
-				# The dep_check() calls are the most expensive QA test. If --force
-				# is enabled, there's no point in wasting time on these since the
-				# user is intent on forcing the commit anyway.
-				continue
-
 			relevant_profiles = []
 			for keyword, arch, groups in dynamic_data['arches']:
 				if arch not in self.profiles:


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

* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/
@ 2016-03-11  0:41 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2016-03-11  0:41 UTC (permalink / raw
  To: gentoo-commits

commit:     0e3bdc0afb71e76fa2292c999424e2a6c1954cdf
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  4 07:55:55 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Mar 10 23:47:35 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=0e3bdc0a

repoman: Create a new Options class plugin

This handles an options.force bypass using the is_forced() from withing the plugin system.

 pym/repoman/modules/scan/options/__init__.py | 24 ++++++++++++++++++++++++
 pym/repoman/modules/scan/options/options.py  | 18 ++++++++++++++++++
 pym/repoman/scanner.py                       | 10 ++--------
 3 files changed, 44 insertions(+), 8 deletions(-)

diff --git a/pym/repoman/modules/scan/options/__init__.py b/pym/repoman/modules/scan/options/__init__.py
new file mode 100644
index 0000000..2d3d9d2
--- /dev/null
+++ b/pym/repoman/modules/scan/options/__init__.py
@@ -0,0 +1,24 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Options plug-in module for repoman.
+Performs option related actions on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'options',
+	'description': doc,
+	'provides':{
+		'options-module': {
+			'name': "options",
+			'sourcefile': "options",
+			'class': "Options",
+			'description': doc,
+			'functions': ['is_forced'],
+			'func_desc': {
+			},
+		},
+	}
+}
+

diff --git a/pym/repoman/modules/scan/options/options.py b/pym/repoman/modules/scan/options/options.py
new file mode 100644
index 0000000..c2546d6
--- /dev/null
+++ b/pym/repoman/modules/scan/options/options.py
@@ -0,0 +1,18 @@
+
+
+class Options(object):
+
+	def __init__(self, **kwargs):
+		self.options = kwargs.get('options')
+
+	def is_forced(self, **kwargs):
+		if self.options.force:
+			# The dep_check() calls are the most expensive QA test. If --force
+			# is enabled, there's no point in wasting time on these since the
+			# user is intent on forcing the commit anyway.
+			return {'continue': True}
+		return {'continue': False}
+
+	@property
+	def runInEbuilds(self):
+		return (True, [self.is_forced])

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index fac2bf6..88eaa4b 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -291,6 +291,8 @@ class Scanner(object):
 				('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
 				('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
 				('mtime', 'MtimeChecks'), ('multicheck', 'MultiCheck'),
+				# Options.is_forced() is used to bypass further checks
+				('options', 'Options'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -318,14 +320,6 @@ class Scanner(object):
 			if y_ebuild_continue:
 				continue
 
-			# Syntax Checks
-
-			if self.options.force:
-				# The dep_check() calls are the most expensive QA test. If --force
-				# is enabled, there's no point in wasting time on these since the
-				# user is intent on forcing the commit anyway.
-				continue
-
 			relevant_profiles = []
 			for keyword, arch, groups in dynamic_data['arches']:
 				if arch not in self.profiles:


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

end of thread, other threads:[~2016-03-11  0:41 UTC | newest]

Thread overview: 9+ 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/modules/scan/options/, pym/repoman/ Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2016-03-11  0:41 Brian Dolbec
2016-03-07 21:53 Brian Dolbec
2016-01-30  8:00 Brian Dolbec
2016-01-30  6:58 Brian Dolbec
2016-01-29  5:01 Brian Dolbec
2016-01-27 23:15 Brian Dolbec
2016-01-11  8:01 Brian Dolbec
2016-01-10 20:17 Brian Dolbec

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