[gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/modules/scan/arches/, ...
commit: 9d3410068bd57cf10b73f6c63421529213bee656 Author: Brian Dolbec gentoo org> AuthorDate: Wed Mar 16 17:10:40 2016 + Commit: Brian Dolbec gentoo org> CommitDate: Wed Mar 16 17:10:40 2016 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=9d341006 repoman: Rough out an initial new data requirements listing in module_spec pym/repoman/modules/scan/arches/__init__.py | 4 pym/repoman/modules/scan/depend/__init__.py | 14 ++ pym/repoman/modules/scan/directories/__init__.py | 8 pym/repoman/modules/scan/eapi/__init__.py| 4 pym/repoman/modules/scan/ebuild/__init__.py | 12 pym/repoman/modules/scan/eclasses/__init__.py| 8 pym/repoman/modules/scan/fetch/__init__.py | 4 pym/repoman/modules/scan/keywords/__init__.py| 4 pym/repoman/modules/scan/manifest/__init__.py| 4 pym/repoman/modules/scan/metadata/__init__.py| 24 pym/repoman/modules/scan/mirrors/__init__.py | 4 pym/repoman/modules/scan/options/__init__.py | 4 pym/repoman/modules/scan/status/__init__.py | 4 pym/repoman/modules/scan/use/__init__.py | 4 14 files changed, 102 insertions(+) diff --git a/pym/repoman/modules/scan/arches/__init__.py b/pym/repoman/modules/scan/arches/__init__.py index d080c30..f8f941c 100644 --- a/pym/repoman/modules/scan/arches/__init__.py +++ b/pym/repoman/modules/scan/arches/__init__.py @@ -18,6 +18,10 @@ module_spec = { 'functions': ['check'], 'func_desc': { }, + 'mod_kwargs': ['options', 'repo_settings', 'profiles' + ], + 'func_kwargs': {'ebuild': , + }, }, } } diff --git a/pym/repoman/modules/scan/depend/__init__.py b/pym/repoman/modules/scan/depend/__init__.py index 9fd7970..a0f2f9a 100644 --- a/pym/repoman/modules/scan/depend/__init__.py +++ b/pym/repoman/modules/scan/depend/__init__.py @@ -18,6 +18,10 @@ module_spec = { 'functions': ['check'], 'func_desc': { }, + 'mod_kwargs': ['qatracker', 'portdb' + ], + 'func_kwargs': { + }, }, 'profile-module': { 'name': "profile", @@ -27,6 +31,12 @@ module_spec = { 'functions': ['check'], 'func_desc': { }, + 'mod_kwargs': ['qatracker', 'portdb', 'profiles', 'options', + 'repo_settings', 'include_arches', 'caches', + 'repoman_incrementals', 'env', 'have', 'dev_keywords' + ], + 'func_kwargs': { + }, }, 'unknown-module': { 'name': "unknown", @@ -36,6 +46,10 @@ module_spec = { 'functions': ['check'], 'func_desc': { }, + 'mod_kwargs': ['qatracker', + ], + 'func_kwargs': { + }, }, } } diff --git a/pym/repoman/modules/scan/directories/__init__.py b/pym/repoman/modules/scan/directories/__init__.py index ec18d30..d50ace5 100644 --- a/pym/repoman/modules/scan/directories/__init__.py +++ b/pym/repoman/modules/scan/directories/__init__.py @@ -18,6 +18,10 @@ module_spec = { 'functions': ['check'], 'func_kwargs': { }, + 'mod_kwargs': ['portdb', 'qatracker', 'repo_settings', 'vcs_settings', + ], + 'func_kwargs': { + }, }, 'mtime-module': { 'name': "mtime", @@ -27,6 +31,10 @@ module_spec = { 'functions': ['check'], 'func_kwargs': { }, + 'mod_kwargs': ['vcs_settings', + ], + 'func_kwargs': { + }, }, } } diff --git a/pym/repoman/modules/scan/eapi/__init__.py b/pym/repoman/modules/scan/eapi/__init__.py index 39bab4d..63618ab 100644 --- a/pym/repoman/modules/scan/eapi/__init__.py +++ b/pym/repoman/modules/scan/eapi/__init__.py @@ -18,6 +18,10 @@ module_spec = { 'functions': ['check'], 'func_kwargs': { }, + 'mod_kwargs': ['qatracker', 'repo_settings' + ], + 'func_kwargs': { +
[gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/
commit: 0e3bdc0afb71e76fa2292c999424e2a6c1954cdf Author: Brian Dolbec gentoo org> AuthorDate: Mon Jan 4 07:55:55 2016 + Commit: Brian Dolbec gentoo org> CommitDate: Thu Mar 10 23:47:35 2016 + 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 000..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 000..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:
[gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/
commit: 2290fc1382ac8051f595187bda03dc25fcb3b6fb Author: Brian Dolbec gentoo org> AuthorDate: Mon Jan 4 07:55:55 2016 + Commit: Brian Dolbec gentoo org> CommitDate: Mon Mar 7 21:21:11 2016 + 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 000..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 000..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:
[gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/
commit: 926a641c8fd26eba5a85d3f372682e61d06dc50d Author: Brian Dolbec gentoo org> AuthorDate: Mon Jan 4 07:55:55 2016 + Commit: Brian Dolbec gentoo org> CommitDate: Sat Jan 30 07:50:20 2016 + 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 000..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 000..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:
[gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/
commit: 075a66c9092b54e0846e494a2b7f92f5d981f957 Author: Brian Dolbec gentoo org> AuthorDate: Mon Jan 4 07:55:55 2016 + Commit: Brian Dolbec gentoo org> CommitDate: Sat Jan 30 06:51:57 2016 + 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 000..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 000..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:
[gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/
commit: 0eb28fa99d79bdf0b434524eeb7c52f87deb733f Author: Brian Dolbec gentoo org> AuthorDate: Mon Jan 4 07:55:55 2016 + Commit: Brian Dolbec gentoo org> CommitDate: Fri Jan 29 04:52:59 2016 + 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 000..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 000..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:
[gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/
commit: a4c6c0735dfebfafa3c1418e8517e482cd2e76e8 Author: Brian Dolbec gentoo org> AuthorDate: Mon Jan 4 07:55:55 2016 + Commit: Brian Dolbec gentoo org> CommitDate: Wed Jan 27 22:44:24 2016 + 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 000..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 000..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:
[gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/
commit: f433f39038dc27807dcb99fc94f12ea0fcb380ec Author: Brian Dolbec gentoo org> AuthorDate: Mon Jan 4 07:55:55 2016 + Commit: Brian Dolbec gentoo org> CommitDate: Sat Jan 23 01:35:17 2016 + 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 000..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 000..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:
[gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/
commit: 40c2bdf3d00f05d9bcbf74796c460e909eea4742 Author: Brian Dolbec gentoo org> AuthorDate: Mon Jan 4 07:55:55 2016 + Commit: Brian Dolbec gentoo org> CommitDate: Mon Jan 11 08:00:19 2016 + 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 000..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 000..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:
[gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/options/, pym/repoman/
commit: 9404bbfa1a596a93f37fd29bb8ee559358e10d12 Author: Brian Dolbec gentoo org> AuthorDate: Mon Jan 4 07:55:55 2016 + Commit: Brian Dolbec gentoo org> CommitDate: Sun Jan 10 20:15:08 2016 + 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 000..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 000..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: