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

commit:     59a03a85d16e779c0cd6b03d1b5f5505c7054a89
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  6 04:08:24 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=59a03a85

repoman: Create a new options 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 b6d2441..809b8db 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -292,6 +292,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'), ('profile', 'ProfileDependsChecks'),
 				]:
 				if mod[0]:
 					mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -322,14 +324,6 @@ class Scanner(object):
 
 			print("**** finished plugin loop, continuing...")
 
-			# 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/, pym/repoman/modules/scan/options/
@ 2016-01-10  3:26 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2016-01-10  3:26 UTC (permalink / raw
  To: gentoo-commits

commit:     e1ea46d0e76da941fe078e4fe933a9b74ff7d459
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 03:23:52 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=e1ea46d0

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/, pym/repoman/modules/scan/options/
@ 2016-01-11  6:31 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2016-01-11  6:31 UTC (permalink / raw
  To: gentoo-commits

commit:     d775bb08d44ccff3dc7c4c686faf32be16c064bf
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 22:59:37 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=d775bb08

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/, pym/repoman/modules/scan/options/
@ 2016-01-18 19:23 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2016-01-18 19:23 UTC (permalink / raw
  To: gentoo-commits

commit:     03e79db5d907fa5bf426565e254c630908d75298
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 18 19:20:03 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=03e79db5

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/, pym/repoman/modules/scan/options/
@ 2016-01-21 18:30 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2016-01-21 18:30 UTC (permalink / raw
  To: gentoo-commits

commit:     57f9149d1abd169fbfb7520d4117a52a72fcdf8f
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 Jan 21 02:53:39 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=57f9149d

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 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/, pym/repoman/modules/scan/options/
@ 2016-01-21 19:42 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2016-01-21 19:42 UTC (permalink / raw
  To: gentoo-commits

commit:     5ebf335266246a9bd08072a05c8cf7105a89ceaf
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 Jan 21 19:28:19 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=5ebf3352

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 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/, pym/repoman/modules/scan/options/
@ 2016-01-22 20:55 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2016-01-22 20:55 UTC (permalink / raw
  To: gentoo-commits

commit:     abad413052044eed740a88dbfb59cc979822851f
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 22 18:44:14 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=abad4130

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 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/, pym/repoman/modules/scan/options/
@ 2016-01-31 20:03 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2016-01-31 20:03 UTC (permalink / raw
  To: gentoo-commits

commit:     b2aed300f9d0f06a735c9759e7714308b3dfefd8
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 20:25:23 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=b2aed300

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 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/, pym/repoman/modules/scan/options/
@ 2016-03-12 18:10 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2016-03-12 18:10 UTC (permalink / raw
  To: gentoo-commits

commit:     c1b5828828df31a99da67116ef50a84d3f99549c
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 Mar 12 17:57:38 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=c1b58288

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-12 18:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-31 20:03 [gentoo-commits] proj/portage:repoman commit in: pym/repoman/, pym/repoman/modules/scan/options/ Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2016-03-12 18:10 Brian Dolbec
2016-01-22 20:55 Brian Dolbec
2016-01-21 19:42 Brian Dolbec
2016-01-21 18:30 Brian Dolbec
2016-01-18 19:23 Brian Dolbec
2016-01-11  6:31 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