* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/directories/, pym/repoman/
@ 2016-01-06 4:21 Brian Dolbec
0 siblings, 0 replies; 15+ messages in thread
From: Brian Dolbec @ 2016-01-06 4:21 UTC (permalink / raw
To: gentoo-commits
commit: 304a5064770769aa4d01bd5a5385384dae4ba681
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 3 23:23:52 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=304a5064
repoman: Migrate code to a new MtimeChecks class in directories plugin
pym/repoman/modules/scan/directories/__init__.py | 8 ++++++++
pym/repoman/modules/scan/directories/mtime.py | 24 ++++++++++++++++++++++++
pym/repoman/scanner.py | 5 +----
3 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/pym/repoman/modules/scan/directories/__init__.py b/pym/repoman/modules/scan/directories/__init__.py
index 7fe9f0e..b9daef0 100644
--- a/pym/repoman/modules/scan/directories/__init__.py
+++ b/pym/repoman/modules/scan/directories/__init__.py
@@ -18,6 +18,14 @@ module_spec = {
'func_kwargs': {
},
},
+ 'mtime-module': {
+ 'name': "mtime",
+ 'class': "MtimeChecks",
+ 'description': doc,
+ 'functions': ['check'],
+ 'func_kwargs': {
+ },
+ },
}
}
diff --git a/pym/repoman/modules/scan/directories/mtime.py b/pym/repoman/modules/scan/directories/mtime.py
new file mode 100644
index 0000000..e113cdd
--- /dev/null
+++ b/pym/repoman/modules/scan/directories/mtime.py
@@ -0,0 +1,24 @@
+
+
+class MtimeChecks(object):
+
+ def __init__(self, **kwargs):
+ self.vcs_settings = kwargs.get('vcs_settings')
+
+ def check(self, **kwargs):
+ ebuild = kwargs.get('ebuild')
+ changed = kwargs.get('changed')
+ pkg = kwargs.get('pkg')
+ if not self.vcs_settings.vcs_preserves_mtime:
+ if ebuild.ebuild_path not in changed.new_ebuilds and \
+ ebuild.ebuild_path not in changed.ebuilds:
+ pkg.mtime = None
+ return {'continue': False}
+
+ @property
+ def runInPkgs(self):
+ return (False, [])
+
+ @property
+ def runInEbuilds(self):
+ return (True, [self.check])
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 457bdcb..7640dca 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -295,6 +295,7 @@ class Scanner(object):
('arches', 'ArchChecks'), ('depend', 'DependChecks'),
('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
+ ('mtime', 'MtimeChecks'),
]:
if mod[0]:
mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -326,10 +327,6 @@ class Scanner(object):
print("**** finished plugin loop, continuing...")
# Syntax Checks
- if not self.vcs_settings.vcs_preserves_mtime:
- if dynamic_data['ebuild'].ebuild_path not in self.changed.new_ebuilds and \
- dynamic_data['ebuild'].ebuild_path not in self.changed.ebuilds:
- dynamic_data['pkg'].mtime = None
try:
# All ebuilds should have utf_8 encoding.
f = io.open(
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/directories/, pym/repoman/
@ 2016-01-10 3:26 Brian Dolbec
0 siblings, 0 replies; 15+ messages in thread
From: Brian Dolbec @ 2016-01-10 3:26 UTC (permalink / raw
To: gentoo-commits
commit: 9413c11a3d156addb642b0758ecd4535e76a26ad
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 4 04:44:05 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=9413c11a
repoman: Create new EncodingCheck class plugin
pym/repoman/modules/scan/directories/__init__.py | 8 +++++
pym/repoman/modules/scan/directories/encoding.py | 41 ++++++++++++++++++++++++
pym/repoman/scanner.py | 21 +-----------
3 files changed, 50 insertions(+), 20 deletions(-)
diff --git a/pym/repoman/modules/scan/directories/__init__.py b/pym/repoman/modules/scan/directories/__init__.py
index b9daef0..548d393 100644
--- a/pym/repoman/modules/scan/directories/__init__.py
+++ b/pym/repoman/modules/scan/directories/__init__.py
@@ -26,6 +26,14 @@ module_spec = {
'func_kwargs': {
},
},
+ 'encoding-module': {
+ 'name': "encoding",
+ 'class': "EncodingCheck",
+ 'description': doc,
+ 'functions': ['check'],
+ 'func_kwargs': {
+ },
+ },
}
}
diff --git a/pym/repoman/modules/scan/directories/encoding.py b/pym/repoman/modules/scan/directories/encoding.py
new file mode 100644
index 0000000..0985e16
--- /dev/null
+++ b/pym/repoman/modules/scan/directories/encoding.py
@@ -0,0 +1,41 @@
+
+import io
+
+from portage import _encodings
+from portage import _unicode_encode
+
+from repoman.checks.ebuilds.checks import run_checks
+
+
+class EncodingCheck(object):
+
+ def __init__(self, **kwargs):
+ self.qatracker = kwargs.get('qatracker')
+
+ def check(self, **kwargs):
+ ebuild = kwargs.get('ebuild')
+ pkg = kwargs.get('pkg')
+ try:
+ # All ebuilds should have utf_8 encoding.
+ f = io.open(
+ _unicode_encode(ebuild.full_path, encoding=_encodings['fs'],
+ errors='strict'),
+ mode='r', encoding=_encodings['repo.content'])
+ try:
+ for check_name, e in run_checks(f, pkg):
+ self.qatracker.add_error(
+ check_name, ebuild.relative_path + ': %s' % e)
+ finally:
+ f.close()
+ except UnicodeDecodeError:
+ # A file.UTF8 failure will have already been recorded.
+ pass
+ return {'continue': False}
+
+ @property
+ def runInPkgs(self):
+ return (False, [])
+
+ @property
+ def runInEbuilds(self):
+ return (True, [self.check])
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index b00dbd9..ac77d1f 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -3,7 +3,6 @@
from __future__ import print_function, unicode_literals
import copy
-import io
import logging
from itertools import chain
from pprint import pformat
@@ -13,11 +12,8 @@ from _emerge.Package import Package
import portage
from portage import normalize_path
from portage import os
-from portage import _encodings
-from portage import _unicode_encode
from portage.dep import Atom
from portage.output import green
-from repoman.checks.ebuilds.checks import run_checks
from repoman.modules.commit import repochecks
from repoman.profile import check_profiles, dev_profile_keywords, setup_profile
from repoman.repos import repo_metadata
@@ -293,7 +289,7 @@ class Scanner(object):
('arches', 'ArchChecks'), ('depend', 'DependChecks'),
('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
- ('mtime', 'MtimeChecks'),
+ ('mtime', 'MtimeChecks'), ('encoding', 'EncodingCheck'),
]:
if mod[0]:
mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -322,21 +318,6 @@ class Scanner(object):
continue
# Syntax Checks
- try:
- # All ebuilds should have utf_8 encoding.
- f = io.open(
- _unicode_encode(
- dynamic_data['ebuild'].full_path, encoding=_encodings['fs'], errors='strict'),
- mode='r', encoding=_encodings['repo.content'])
- try:
- for check_name, e in run_checks(f, dynamic_data['pkg']):
- self.qatracker.add_error(
- check_name, dynamic_data['ebuild'].relative_path + ': %s' % e)
- finally:
- f.close()
- except UnicodeDecodeError:
- # A file.UTF8 failure will have already been recorded above.
- pass
if self.options.force:
# The dep_check() calls are the most expensive QA test. If --force
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/directories/, pym/repoman/
@ 2016-01-11 6:31 Brian Dolbec
0 siblings, 0 replies; 15+ messages in thread
From: Brian Dolbec @ 2016-01-11 6:31 UTC (permalink / raw
To: gentoo-commits
commit: 35b9fb610626831c008cffbfb5c403c1243b6175
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 3 23:23:52 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=35b9fb61
repoman: Migrate code to a new MtimeChecks class in directories plugin
pym/repoman/modules/scan/directories/__init__.py | 8 ++++++++
pym/repoman/modules/scan/directories/mtime.py | 24 ++++++++++++++++++++++++
pym/repoman/scanner.py | 5 +----
3 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/pym/repoman/modules/scan/directories/__init__.py b/pym/repoman/modules/scan/directories/__init__.py
index 7fe9f0e..b9daef0 100644
--- a/pym/repoman/modules/scan/directories/__init__.py
+++ b/pym/repoman/modules/scan/directories/__init__.py
@@ -18,6 +18,14 @@ module_spec = {
'func_kwargs': {
},
},
+ 'mtime-module': {
+ 'name': "mtime",
+ 'class': "MtimeChecks",
+ 'description': doc,
+ 'functions': ['check'],
+ 'func_kwargs': {
+ },
+ },
}
}
diff --git a/pym/repoman/modules/scan/directories/mtime.py b/pym/repoman/modules/scan/directories/mtime.py
new file mode 100644
index 0000000..e113cdd
--- /dev/null
+++ b/pym/repoman/modules/scan/directories/mtime.py
@@ -0,0 +1,24 @@
+
+
+class MtimeChecks(object):
+
+ def __init__(self, **kwargs):
+ self.vcs_settings = kwargs.get('vcs_settings')
+
+ def check(self, **kwargs):
+ ebuild = kwargs.get('ebuild')
+ changed = kwargs.get('changed')
+ pkg = kwargs.get('pkg')
+ if not self.vcs_settings.vcs_preserves_mtime:
+ if ebuild.ebuild_path not in changed.new_ebuilds and \
+ ebuild.ebuild_path not in changed.ebuilds:
+ pkg.mtime = None
+ return {'continue': False}
+
+ @property
+ def runInPkgs(self):
+ return (False, [])
+
+ @property
+ def runInEbuilds(self):
+ return (True, [self.check])
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 8657c73..b00dbd9 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -293,6 +293,7 @@ class Scanner(object):
('arches', 'ArchChecks'), ('depend', 'DependChecks'),
('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
+ ('mtime', 'MtimeChecks'),
]:
if mod[0]:
mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -321,10 +322,6 @@ class Scanner(object):
continue
# Syntax Checks
- if not self.vcs_settings.vcs_preserves_mtime:
- if dynamic_data['ebuild'].ebuild_path not in self.changed.new_ebuilds and \
- dynamic_data['ebuild'].ebuild_path not in self.changed.ebuilds:
- dynamic_data['pkg'].mtime = None
try:
# All ebuilds should have utf_8 encoding.
f = io.open(
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/directories/, pym/repoman/
@ 2016-01-11 8:01 Brian Dolbec
0 siblings, 0 replies; 15+ messages in thread
From: Brian Dolbec @ 2016-01-11 8:01 UTC (permalink / raw
To: gentoo-commits
commit: a7abf497b92fcd20b122473a71e8ce69a5995029
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 3 23:23:52 2016 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon Jan 11 08:00:18 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=a7abf497
repoman: Migrate code to a new MtimeChecks class in directories plugin
pym/repoman/modules/scan/directories/__init__.py | 8 ++++++++
pym/repoman/modules/scan/directories/mtime.py | 24 ++++++++++++++++++++++++
pym/repoman/scanner.py | 5 +----
3 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/pym/repoman/modules/scan/directories/__init__.py b/pym/repoman/modules/scan/directories/__init__.py
index 7fe9f0e..b9daef0 100644
--- a/pym/repoman/modules/scan/directories/__init__.py
+++ b/pym/repoman/modules/scan/directories/__init__.py
@@ -18,6 +18,14 @@ module_spec = {
'func_kwargs': {
},
},
+ 'mtime-module': {
+ 'name': "mtime",
+ 'class': "MtimeChecks",
+ 'description': doc,
+ 'functions': ['check'],
+ 'func_kwargs': {
+ },
+ },
}
}
diff --git a/pym/repoman/modules/scan/directories/mtime.py b/pym/repoman/modules/scan/directories/mtime.py
new file mode 100644
index 0000000..e113cdd
--- /dev/null
+++ b/pym/repoman/modules/scan/directories/mtime.py
@@ -0,0 +1,24 @@
+
+
+class MtimeChecks(object):
+
+ def __init__(self, **kwargs):
+ self.vcs_settings = kwargs.get('vcs_settings')
+
+ def check(self, **kwargs):
+ ebuild = kwargs.get('ebuild')
+ changed = kwargs.get('changed')
+ pkg = kwargs.get('pkg')
+ if not self.vcs_settings.vcs_preserves_mtime:
+ if ebuild.ebuild_path not in changed.new_ebuilds and \
+ ebuild.ebuild_path not in changed.ebuilds:
+ pkg.mtime = None
+ return {'continue': False}
+
+ @property
+ def runInPkgs(self):
+ return (False, [])
+
+ @property
+ def runInEbuilds(self):
+ return (True, [self.check])
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 8657c73..b00dbd9 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -293,6 +293,7 @@ class Scanner(object):
('arches', 'ArchChecks'), ('depend', 'DependChecks'),
('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
+ ('mtime', 'MtimeChecks'),
]:
if mod[0]:
mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -321,10 +322,6 @@ class Scanner(object):
continue
# Syntax Checks
- if not self.vcs_settings.vcs_preserves_mtime:
- if dynamic_data['ebuild'].ebuild_path not in self.changed.new_ebuilds and \
- dynamic_data['ebuild'].ebuild_path not in self.changed.ebuilds:
- dynamic_data['pkg'].mtime = None
try:
# All ebuilds should have utf_8 encoding.
f = io.open(
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/directories/, pym/repoman/
@ 2016-01-18 19:23 Brian Dolbec
0 siblings, 0 replies; 15+ messages in thread
From: Brian Dolbec @ 2016-01-18 19:23 UTC (permalink / raw
To: gentoo-commits
commit: 7609a1b012c9b91b01164dad8e4bc16cf0c3871e
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 4 04:44:05 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=7609a1b0
repoman: Create new EncodingCheck class plugin
pym/repoman/modules/scan/directories/__init__.py | 8 +++++
pym/repoman/modules/scan/directories/encoding.py | 41 ++++++++++++++++++++++++
pym/repoman/scanner.py | 21 +-----------
3 files changed, 50 insertions(+), 20 deletions(-)
diff --git a/pym/repoman/modules/scan/directories/__init__.py b/pym/repoman/modules/scan/directories/__init__.py
index b9daef0..548d393 100644
--- a/pym/repoman/modules/scan/directories/__init__.py
+++ b/pym/repoman/modules/scan/directories/__init__.py
@@ -26,6 +26,14 @@ module_spec = {
'func_kwargs': {
},
},
+ 'encoding-module': {
+ 'name': "encoding",
+ 'class': "EncodingCheck",
+ 'description': doc,
+ 'functions': ['check'],
+ 'func_kwargs': {
+ },
+ },
}
}
diff --git a/pym/repoman/modules/scan/directories/encoding.py b/pym/repoman/modules/scan/directories/encoding.py
new file mode 100644
index 0000000..0985e16
--- /dev/null
+++ b/pym/repoman/modules/scan/directories/encoding.py
@@ -0,0 +1,41 @@
+
+import io
+
+from portage import _encodings
+from portage import _unicode_encode
+
+from repoman.checks.ebuilds.checks import run_checks
+
+
+class EncodingCheck(object):
+
+ def __init__(self, **kwargs):
+ self.qatracker = kwargs.get('qatracker')
+
+ def check(self, **kwargs):
+ ebuild = kwargs.get('ebuild')
+ pkg = kwargs.get('pkg')
+ try:
+ # All ebuilds should have utf_8 encoding.
+ f = io.open(
+ _unicode_encode(ebuild.full_path, encoding=_encodings['fs'],
+ errors='strict'),
+ mode='r', encoding=_encodings['repo.content'])
+ try:
+ for check_name, e in run_checks(f, pkg):
+ self.qatracker.add_error(
+ check_name, ebuild.relative_path + ': %s' % e)
+ finally:
+ f.close()
+ except UnicodeDecodeError:
+ # A file.UTF8 failure will have already been recorded.
+ pass
+ return {'continue': False}
+
+ @property
+ def runInPkgs(self):
+ return (False, [])
+
+ @property
+ def runInEbuilds(self):
+ return (True, [self.check])
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index b00dbd9..ac77d1f 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -3,7 +3,6 @@
from __future__ import print_function, unicode_literals
import copy
-import io
import logging
from itertools import chain
from pprint import pformat
@@ -13,11 +12,8 @@ from _emerge.Package import Package
import portage
from portage import normalize_path
from portage import os
-from portage import _encodings
-from portage import _unicode_encode
from portage.dep import Atom
from portage.output import green
-from repoman.checks.ebuilds.checks import run_checks
from repoman.modules.commit import repochecks
from repoman.profile import check_profiles, dev_profile_keywords, setup_profile
from repoman.repos import repo_metadata
@@ -293,7 +289,7 @@ class Scanner(object):
('arches', 'ArchChecks'), ('depend', 'DependChecks'),
('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
- ('mtime', 'MtimeChecks'),
+ ('mtime', 'MtimeChecks'), ('encoding', 'EncodingCheck'),
]:
if mod[0]:
mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -322,21 +318,6 @@ class Scanner(object):
continue
# Syntax Checks
- try:
- # All ebuilds should have utf_8 encoding.
- f = io.open(
- _unicode_encode(
- dynamic_data['ebuild'].full_path, encoding=_encodings['fs'], errors='strict'),
- mode='r', encoding=_encodings['repo.content'])
- try:
- for check_name, e in run_checks(f, dynamic_data['pkg']):
- self.qatracker.add_error(
- check_name, dynamic_data['ebuild'].relative_path + ': %s' % e)
- finally:
- f.close()
- except UnicodeDecodeError:
- # A file.UTF8 failure will have already been recorded above.
- pass
if self.options.force:
# The dep_check() calls are the most expensive QA test. If --force
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/directories/, pym/repoman/
@ 2016-01-18 19:23 Brian Dolbec
0 siblings, 0 replies; 15+ messages in thread
From: Brian Dolbec @ 2016-01-18 19:23 UTC (permalink / raw
To: gentoo-commits
commit: 451fb7d79279e9a7339e84b802cf15443466f370
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 3 23:23:52 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=451fb7d7
repoman: Migrate code to a new MtimeChecks class in directories plugin
pym/repoman/modules/scan/directories/__init__.py | 8 ++++++++
pym/repoman/modules/scan/directories/mtime.py | 24 ++++++++++++++++++++++++
pym/repoman/scanner.py | 5 +----
3 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/pym/repoman/modules/scan/directories/__init__.py b/pym/repoman/modules/scan/directories/__init__.py
index 7fe9f0e..b9daef0 100644
--- a/pym/repoman/modules/scan/directories/__init__.py
+++ b/pym/repoman/modules/scan/directories/__init__.py
@@ -18,6 +18,14 @@ module_spec = {
'func_kwargs': {
},
},
+ 'mtime-module': {
+ 'name': "mtime",
+ 'class': "MtimeChecks",
+ 'description': doc,
+ 'functions': ['check'],
+ 'func_kwargs': {
+ },
+ },
}
}
diff --git a/pym/repoman/modules/scan/directories/mtime.py b/pym/repoman/modules/scan/directories/mtime.py
new file mode 100644
index 0000000..e113cdd
--- /dev/null
+++ b/pym/repoman/modules/scan/directories/mtime.py
@@ -0,0 +1,24 @@
+
+
+class MtimeChecks(object):
+
+ def __init__(self, **kwargs):
+ self.vcs_settings = kwargs.get('vcs_settings')
+
+ def check(self, **kwargs):
+ ebuild = kwargs.get('ebuild')
+ changed = kwargs.get('changed')
+ pkg = kwargs.get('pkg')
+ if not self.vcs_settings.vcs_preserves_mtime:
+ if ebuild.ebuild_path not in changed.new_ebuilds and \
+ ebuild.ebuild_path not in changed.ebuilds:
+ pkg.mtime = None
+ return {'continue': False}
+
+ @property
+ def runInPkgs(self):
+ return (False, [])
+
+ @property
+ def runInEbuilds(self):
+ return (True, [self.check])
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 8657c73..b00dbd9 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -293,6 +293,7 @@ class Scanner(object):
('arches', 'ArchChecks'), ('depend', 'DependChecks'),
('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
+ ('mtime', 'MtimeChecks'),
]:
if mod[0]:
mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -321,10 +322,6 @@ class Scanner(object):
continue
# Syntax Checks
- if not self.vcs_settings.vcs_preserves_mtime:
- if dynamic_data['ebuild'].ebuild_path not in self.changed.new_ebuilds and \
- dynamic_data['ebuild'].ebuild_path not in self.changed.ebuilds:
- dynamic_data['pkg'].mtime = None
try:
# All ebuilds should have utf_8 encoding.
f = io.open(
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/directories/, pym/repoman/
@ 2016-01-21 18:30 Brian Dolbec
0 siblings, 0 replies; 15+ messages in thread
From: Brian Dolbec @ 2016-01-21 18:30 UTC (permalink / raw
To: gentoo-commits
commit: 71d070cccf6b34fa39bf2549029dc1253e14c736
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 3 23:23:52 2016 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Jan 21 00:35:22 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=71d070cc
repoman: Migrate code to a new MtimeChecks class in directories plugin
pym/repoman/modules/scan/directories/__init__.py | 8 ++++++++
pym/repoman/modules/scan/directories/mtime.py | 24 ++++++++++++++++++++++++
pym/repoman/scanner.py | 5 +----
3 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/pym/repoman/modules/scan/directories/__init__.py b/pym/repoman/modules/scan/directories/__init__.py
index 7fe9f0e..b9daef0 100644
--- a/pym/repoman/modules/scan/directories/__init__.py
+++ b/pym/repoman/modules/scan/directories/__init__.py
@@ -18,6 +18,14 @@ module_spec = {
'func_kwargs': {
},
},
+ 'mtime-module': {
+ 'name': "mtime",
+ 'class': "MtimeChecks",
+ 'description': doc,
+ 'functions': ['check'],
+ 'func_kwargs': {
+ },
+ },
}
}
diff --git a/pym/repoman/modules/scan/directories/mtime.py b/pym/repoman/modules/scan/directories/mtime.py
new file mode 100644
index 0000000..e113cdd
--- /dev/null
+++ b/pym/repoman/modules/scan/directories/mtime.py
@@ -0,0 +1,24 @@
+
+
+class MtimeChecks(object):
+
+ def __init__(self, **kwargs):
+ self.vcs_settings = kwargs.get('vcs_settings')
+
+ def check(self, **kwargs):
+ ebuild = kwargs.get('ebuild')
+ changed = kwargs.get('changed')
+ pkg = kwargs.get('pkg')
+ if not self.vcs_settings.vcs_preserves_mtime:
+ if ebuild.ebuild_path not in changed.new_ebuilds and \
+ ebuild.ebuild_path not in changed.ebuilds:
+ pkg.mtime = None
+ return {'continue': False}
+
+ @property
+ def runInPkgs(self):
+ return (False, [])
+
+ @property
+ def runInEbuilds(self):
+ return (True, [self.check])
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 8657c73..b00dbd9 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -293,6 +293,7 @@ class Scanner(object):
('arches', 'ArchChecks'), ('depend', 'DependChecks'),
('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
+ ('mtime', 'MtimeChecks'),
]:
if mod[0]:
mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -321,10 +322,6 @@ class Scanner(object):
continue
# Syntax Checks
- if not self.vcs_settings.vcs_preserves_mtime:
- if dynamic_data['ebuild'].ebuild_path not in self.changed.new_ebuilds and \
- dynamic_data['ebuild'].ebuild_path not in self.changed.ebuilds:
- dynamic_data['pkg'].mtime = None
try:
# All ebuilds should have utf_8 encoding.
f = io.open(
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/directories/, pym/repoman/
@ 2016-01-22 20:55 Brian Dolbec
0 siblings, 0 replies; 15+ messages in thread
From: Brian Dolbec @ 2016-01-22 20:55 UTC (permalink / raw
To: gentoo-commits
commit: 53c62710cc5c5fa7c2a11a01a825edaee454c073
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 3 23:23:52 2016 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Jan 22 18:44:13 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=53c62710
repoman: Migrate code to a new MtimeChecks class in directories plugin
pym/repoman/modules/scan/directories/__init__.py | 8 ++++++++
pym/repoman/modules/scan/directories/mtime.py | 24 ++++++++++++++++++++++++
pym/repoman/scanner.py | 5 +----
3 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/pym/repoman/modules/scan/directories/__init__.py b/pym/repoman/modules/scan/directories/__init__.py
index 7fe9f0e..b9daef0 100644
--- a/pym/repoman/modules/scan/directories/__init__.py
+++ b/pym/repoman/modules/scan/directories/__init__.py
@@ -18,6 +18,14 @@ module_spec = {
'func_kwargs': {
},
},
+ 'mtime-module': {
+ 'name': "mtime",
+ 'class': "MtimeChecks",
+ 'description': doc,
+ 'functions': ['check'],
+ 'func_kwargs': {
+ },
+ },
}
}
diff --git a/pym/repoman/modules/scan/directories/mtime.py b/pym/repoman/modules/scan/directories/mtime.py
new file mode 100644
index 0000000..e113cdd
--- /dev/null
+++ b/pym/repoman/modules/scan/directories/mtime.py
@@ -0,0 +1,24 @@
+
+
+class MtimeChecks(object):
+
+ def __init__(self, **kwargs):
+ self.vcs_settings = kwargs.get('vcs_settings')
+
+ def check(self, **kwargs):
+ ebuild = kwargs.get('ebuild')
+ changed = kwargs.get('changed')
+ pkg = kwargs.get('pkg')
+ if not self.vcs_settings.vcs_preserves_mtime:
+ if ebuild.ebuild_path not in changed.new_ebuilds and \
+ ebuild.ebuild_path not in changed.ebuilds:
+ pkg.mtime = None
+ return {'continue': False}
+
+ @property
+ def runInPkgs(self):
+ return (False, [])
+
+ @property
+ def runInEbuilds(self):
+ return (True, [self.check])
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 8657c73..b00dbd9 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -293,6 +293,7 @@ class Scanner(object):
('arches', 'ArchChecks'), ('depend', 'DependChecks'),
('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
+ ('mtime', 'MtimeChecks'),
]:
if mod[0]:
mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -321,10 +322,6 @@ class Scanner(object):
continue
# Syntax Checks
- if not self.vcs_settings.vcs_preserves_mtime:
- if dynamic_data['ebuild'].ebuild_path not in self.changed.new_ebuilds and \
- dynamic_data['ebuild'].ebuild_path not in self.changed.ebuilds:
- dynamic_data['pkg'].mtime = None
try:
# All ebuilds should have utf_8 encoding.
f = io.open(
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/directories/, pym/repoman/
@ 2016-01-27 23:15 Brian Dolbec
0 siblings, 0 replies; 15+ messages in thread
From: Brian Dolbec @ 2016-01-27 23:15 UTC (permalink / raw
To: gentoo-commits
commit: 8a0ca4414e34006590b51272df10f0febf6e9abb
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 3 23:23:52 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=8a0ca441
repoman: Migrate code to a new MtimeChecks class in directories plugin
pym/repoman/modules/scan/directories/__init__.py | 9 +++++++++
pym/repoman/modules/scan/directories/mtime.py | 24 ++++++++++++++++++++++++
pym/repoman/scanner.py | 5 +----
3 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/pym/repoman/modules/scan/directories/__init__.py b/pym/repoman/modules/scan/directories/__init__.py
index bcc6eca..ec18d30 100644
--- a/pym/repoman/modules/scan/directories/__init__.py
+++ b/pym/repoman/modules/scan/directories/__init__.py
@@ -19,6 +19,15 @@ module_spec = {
'func_kwargs': {
},
},
+ 'mtime-module': {
+ 'name': "mtime",
+ 'sourcefile': "mtime",
+ 'class': "MtimeChecks",
+ 'description': doc,
+ 'functions': ['check'],
+ 'func_kwargs': {
+ },
+ },
}
}
diff --git a/pym/repoman/modules/scan/directories/mtime.py b/pym/repoman/modules/scan/directories/mtime.py
new file mode 100644
index 0000000..e113cdd
--- /dev/null
+++ b/pym/repoman/modules/scan/directories/mtime.py
@@ -0,0 +1,24 @@
+
+
+class MtimeChecks(object):
+
+ def __init__(self, **kwargs):
+ self.vcs_settings = kwargs.get('vcs_settings')
+
+ def check(self, **kwargs):
+ ebuild = kwargs.get('ebuild')
+ changed = kwargs.get('changed')
+ pkg = kwargs.get('pkg')
+ if not self.vcs_settings.vcs_preserves_mtime:
+ if ebuild.ebuild_path not in changed.new_ebuilds and \
+ ebuild.ebuild_path not in changed.ebuilds:
+ pkg.mtime = None
+ return {'continue': False}
+
+ @property
+ def runInPkgs(self):
+ return (False, [])
+
+ @property
+ def runInEbuilds(self):
+ return (True, [self.check])
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 1b6bbb4..683d791 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -296,6 +296,7 @@ class Scanner(object):
('arches', 'ArchChecks'), ('depend', 'DependChecks'),
('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
+ ('mtime', 'MtimeChecks'),
]:
if mod[0]:
mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -324,10 +325,6 @@ class Scanner(object):
continue
# Syntax Checks
- if not self.vcs_settings.vcs_preserves_mtime:
- if dynamic_data['ebuild'].ebuild_path not in self.changed.new_ebuilds and \
- dynamic_data['ebuild'].ebuild_path not in self.changed.ebuilds:
- dynamic_data['pkg'].mtime = None
try:
# All ebuilds should have utf_8 encoding.
f = io.open(
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/directories/, pym/repoman/
@ 2016-01-29 5:01 Brian Dolbec
0 siblings, 0 replies; 15+ messages in thread
From: Brian Dolbec @ 2016-01-29 5:01 UTC (permalink / raw
To: gentoo-commits
commit: 7d4a692d86493c774398d9a751855fdc4c10d00c
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 3 23:23:52 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=7d4a692d
repoman: Migrate code to a new MtimeChecks class in directories plugin
pym/repoman/modules/scan/directories/__init__.py | 9 +++++++++
pym/repoman/modules/scan/directories/mtime.py | 24 ++++++++++++++++++++++++
pym/repoman/scanner.py | 5 +----
3 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/pym/repoman/modules/scan/directories/__init__.py b/pym/repoman/modules/scan/directories/__init__.py
index bcc6eca..ec18d30 100644
--- a/pym/repoman/modules/scan/directories/__init__.py
+++ b/pym/repoman/modules/scan/directories/__init__.py
@@ -19,6 +19,15 @@ module_spec = {
'func_kwargs': {
},
},
+ 'mtime-module': {
+ 'name': "mtime",
+ 'sourcefile': "mtime",
+ 'class': "MtimeChecks",
+ 'description': doc,
+ 'functions': ['check'],
+ 'func_kwargs': {
+ },
+ },
}
}
diff --git a/pym/repoman/modules/scan/directories/mtime.py b/pym/repoman/modules/scan/directories/mtime.py
new file mode 100644
index 0000000..e113cdd
--- /dev/null
+++ b/pym/repoman/modules/scan/directories/mtime.py
@@ -0,0 +1,24 @@
+
+
+class MtimeChecks(object):
+
+ def __init__(self, **kwargs):
+ self.vcs_settings = kwargs.get('vcs_settings')
+
+ def check(self, **kwargs):
+ ebuild = kwargs.get('ebuild')
+ changed = kwargs.get('changed')
+ pkg = kwargs.get('pkg')
+ if not self.vcs_settings.vcs_preserves_mtime:
+ if ebuild.ebuild_path not in changed.new_ebuilds and \
+ ebuild.ebuild_path not in changed.ebuilds:
+ pkg.mtime = None
+ return {'continue': False}
+
+ @property
+ def runInPkgs(self):
+ return (False, [])
+
+ @property
+ def runInEbuilds(self):
+ return (True, [self.check])
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 1b6bbb4..683d791 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -296,6 +296,7 @@ class Scanner(object):
('arches', 'ArchChecks'), ('depend', 'DependChecks'),
('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
+ ('mtime', 'MtimeChecks'),
]:
if mod[0]:
mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -324,10 +325,6 @@ class Scanner(object):
continue
# Syntax Checks
- if not self.vcs_settings.vcs_preserves_mtime:
- if dynamic_data['ebuild'].ebuild_path not in self.changed.new_ebuilds and \
- dynamic_data['ebuild'].ebuild_path not in self.changed.ebuilds:
- dynamic_data['pkg'].mtime = None
try:
# All ebuilds should have utf_8 encoding.
f = io.open(
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/directories/, pym/repoman/
@ 2016-01-30 6:58 Brian Dolbec
0 siblings, 0 replies; 15+ messages in thread
From: Brian Dolbec @ 2016-01-30 6:58 UTC (permalink / raw
To: gentoo-commits
commit: 196ac80c1b39d6f5b795b7cbd56c735eeac6414c
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 3 23:23:52 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=196ac80c
repoman: Migrate code to a new MtimeChecks class in directories plugin
pym/repoman/modules/scan/directories/__init__.py | 9 +++++++++
pym/repoman/modules/scan/directories/mtime.py | 24 ++++++++++++++++++++++++
pym/repoman/scanner.py | 5 +----
3 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/pym/repoman/modules/scan/directories/__init__.py b/pym/repoman/modules/scan/directories/__init__.py
index bcc6eca..ec18d30 100644
--- a/pym/repoman/modules/scan/directories/__init__.py
+++ b/pym/repoman/modules/scan/directories/__init__.py
@@ -19,6 +19,15 @@ module_spec = {
'func_kwargs': {
},
},
+ 'mtime-module': {
+ 'name': "mtime",
+ 'sourcefile': "mtime",
+ 'class': "MtimeChecks",
+ 'description': doc,
+ 'functions': ['check'],
+ 'func_kwargs': {
+ },
+ },
}
}
diff --git a/pym/repoman/modules/scan/directories/mtime.py b/pym/repoman/modules/scan/directories/mtime.py
new file mode 100644
index 0000000..e113cdd
--- /dev/null
+++ b/pym/repoman/modules/scan/directories/mtime.py
@@ -0,0 +1,24 @@
+
+
+class MtimeChecks(object):
+
+ def __init__(self, **kwargs):
+ self.vcs_settings = kwargs.get('vcs_settings')
+
+ def check(self, **kwargs):
+ ebuild = kwargs.get('ebuild')
+ changed = kwargs.get('changed')
+ pkg = kwargs.get('pkg')
+ if not self.vcs_settings.vcs_preserves_mtime:
+ if ebuild.ebuild_path not in changed.new_ebuilds and \
+ ebuild.ebuild_path not in changed.ebuilds:
+ pkg.mtime = None
+ return {'continue': False}
+
+ @property
+ def runInPkgs(self):
+ return (False, [])
+
+ @property
+ def runInEbuilds(self):
+ return (True, [self.check])
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index dcb955c..dbbbb15 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -294,6 +294,7 @@ class Scanner(object):
('arches', 'ArchChecks'), ('depend', 'DependChecks'),
('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
+ ('mtime', 'MtimeChecks'),
]:
if mod[0]:
mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -322,10 +323,6 @@ class Scanner(object):
continue
# Syntax Checks
- if not self.vcs_settings.vcs_preserves_mtime:
- if dynamic_data['ebuild'].ebuild_path not in self.changed.new_ebuilds and \
- dynamic_data['ebuild'].ebuild_path not in self.changed.ebuilds:
- dynamic_data['pkg'].mtime = None
try:
# All ebuilds should have utf_8 encoding.
f = io.open(
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/directories/, pym/repoman/
@ 2016-01-30 8:00 Brian Dolbec
0 siblings, 0 replies; 15+ messages in thread
From: Brian Dolbec @ 2016-01-30 8:00 UTC (permalink / raw
To: gentoo-commits
commit: a780c83a7085b3472bd2be0b7f5dbeb17c48ada7
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 3 23:23:52 2016 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Jan 30 07:50:19 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=a780c83a
repoman: Migrate code to a new MtimeChecks class in directories plugin
pym/repoman/modules/scan/directories/__init__.py | 9 +++++++++
pym/repoman/modules/scan/directories/mtime.py | 24 ++++++++++++++++++++++++
pym/repoman/scanner.py | 5 +----
3 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/pym/repoman/modules/scan/directories/__init__.py b/pym/repoman/modules/scan/directories/__init__.py
index bcc6eca..ec18d30 100644
--- a/pym/repoman/modules/scan/directories/__init__.py
+++ b/pym/repoman/modules/scan/directories/__init__.py
@@ -19,6 +19,15 @@ module_spec = {
'func_kwargs': {
},
},
+ 'mtime-module': {
+ 'name': "mtime",
+ 'sourcefile': "mtime",
+ 'class': "MtimeChecks",
+ 'description': doc,
+ 'functions': ['check'],
+ 'func_kwargs': {
+ },
+ },
}
}
diff --git a/pym/repoman/modules/scan/directories/mtime.py b/pym/repoman/modules/scan/directories/mtime.py
new file mode 100644
index 0000000..e113cdd
--- /dev/null
+++ b/pym/repoman/modules/scan/directories/mtime.py
@@ -0,0 +1,24 @@
+
+
+class MtimeChecks(object):
+
+ def __init__(self, **kwargs):
+ self.vcs_settings = kwargs.get('vcs_settings')
+
+ def check(self, **kwargs):
+ ebuild = kwargs.get('ebuild')
+ changed = kwargs.get('changed')
+ pkg = kwargs.get('pkg')
+ if not self.vcs_settings.vcs_preserves_mtime:
+ if ebuild.ebuild_path not in changed.new_ebuilds and \
+ ebuild.ebuild_path not in changed.ebuilds:
+ pkg.mtime = None
+ return {'continue': False}
+
+ @property
+ def runInPkgs(self):
+ return (False, [])
+
+ @property
+ def runInEbuilds(self):
+ return (True, [self.check])
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index dcb955c..dbbbb15 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -294,6 +294,7 @@ class Scanner(object):
('arches', 'ArchChecks'), ('depend', 'DependChecks'),
('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
+ ('mtime', 'MtimeChecks'),
]:
if mod[0]:
mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -322,10 +323,6 @@ class Scanner(object):
continue
# Syntax Checks
- if not self.vcs_settings.vcs_preserves_mtime:
- if dynamic_data['ebuild'].ebuild_path not in self.changed.new_ebuilds and \
- dynamic_data['ebuild'].ebuild_path not in self.changed.ebuilds:
- dynamic_data['pkg'].mtime = None
try:
# All ebuilds should have utf_8 encoding.
f = io.open(
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/directories/, pym/repoman/
@ 2016-01-31 20:03 Brian Dolbec
0 siblings, 0 replies; 15+ messages in thread
From: Brian Dolbec @ 2016-01-31 20:03 UTC (permalink / raw
To: gentoo-commits
commit: c5bd7eacdac16ea2e4b56933f7c85334d51070d6
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 3 23:23:52 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=c5bd7eac
repoman: Migrate code to a new MtimeChecks class in directories plugin
pym/repoman/modules/scan/directories/__init__.py | 9 +++++++++
pym/repoman/modules/scan/directories/mtime.py | 24 ++++++++++++++++++++++++
pym/repoman/scanner.py | 5 +----
3 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/pym/repoman/modules/scan/directories/__init__.py b/pym/repoman/modules/scan/directories/__init__.py
index bcc6eca..ec18d30 100644
--- a/pym/repoman/modules/scan/directories/__init__.py
+++ b/pym/repoman/modules/scan/directories/__init__.py
@@ -19,6 +19,15 @@ module_spec = {
'func_kwargs': {
},
},
+ 'mtime-module': {
+ 'name': "mtime",
+ 'sourcefile': "mtime",
+ 'class': "MtimeChecks",
+ 'description': doc,
+ 'functions': ['check'],
+ 'func_kwargs': {
+ },
+ },
}
}
diff --git a/pym/repoman/modules/scan/directories/mtime.py b/pym/repoman/modules/scan/directories/mtime.py
new file mode 100644
index 0000000..e113cdd
--- /dev/null
+++ b/pym/repoman/modules/scan/directories/mtime.py
@@ -0,0 +1,24 @@
+
+
+class MtimeChecks(object):
+
+ def __init__(self, **kwargs):
+ self.vcs_settings = kwargs.get('vcs_settings')
+
+ def check(self, **kwargs):
+ ebuild = kwargs.get('ebuild')
+ changed = kwargs.get('changed')
+ pkg = kwargs.get('pkg')
+ if not self.vcs_settings.vcs_preserves_mtime:
+ if ebuild.ebuild_path not in changed.new_ebuilds and \
+ ebuild.ebuild_path not in changed.ebuilds:
+ pkg.mtime = None
+ return {'continue': False}
+
+ @property
+ def runInPkgs(self):
+ return (False, [])
+
+ @property
+ def runInEbuilds(self):
+ return (True, [self.check])
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 92e2abd..308b440 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -294,6 +294,7 @@ class Scanner(object):
('arches', 'ArchChecks'), ('depend', 'DependChecks'),
('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
+ ('mtime', 'MtimeChecks'),
]:
if mod[0]:
mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -322,10 +323,6 @@ class Scanner(object):
continue
# Syntax Checks
- if not self.vcs_settings.vcs_preserves_mtime:
- if dynamic_data['ebuild'].ebuild_path not in self.changed.new_ebuilds and \
- dynamic_data['ebuild'].ebuild_path not in self.changed.ebuilds:
- dynamic_data['pkg'].mtime = None
try:
# All ebuilds should have utf_8 encoding.
f = io.open(
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/directories/, pym/repoman/
@ 2016-03-11 0:41 Brian Dolbec
0 siblings, 0 replies; 15+ messages in thread
From: Brian Dolbec @ 2016-03-11 0:41 UTC (permalink / raw
To: gentoo-commits
commit: 5136e5575803b3f2180b49a9f3dff1f51296d6b0
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 3 23:23:52 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=5136e557
repoman: Migrate code to a new MtimeChecks class in directories plugin
pym/repoman/modules/scan/directories/__init__.py | 9 +++++++++
pym/repoman/modules/scan/directories/mtime.py | 20 ++++++++++++++++++++
pym/repoman/scanner.py | 5 +----
3 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/pym/repoman/modules/scan/directories/__init__.py b/pym/repoman/modules/scan/directories/__init__.py
index bcc6eca..ec18d30 100644
--- a/pym/repoman/modules/scan/directories/__init__.py
+++ b/pym/repoman/modules/scan/directories/__init__.py
@@ -19,6 +19,15 @@ module_spec = {
'func_kwargs': {
},
},
+ 'mtime-module': {
+ 'name': "mtime",
+ 'sourcefile': "mtime",
+ 'class': "MtimeChecks",
+ 'description': doc,
+ 'functions': ['check'],
+ 'func_kwargs': {
+ },
+ },
}
}
diff --git a/pym/repoman/modules/scan/directories/mtime.py b/pym/repoman/modules/scan/directories/mtime.py
new file mode 100644
index 0000000..e25b553
--- /dev/null
+++ b/pym/repoman/modules/scan/directories/mtime.py
@@ -0,0 +1,20 @@
+
+
+class MtimeChecks(object):
+
+ def __init__(self, **kwargs):
+ self.vcs_settings = kwargs.get('vcs_settings')
+
+ def check(self, **kwargs):
+ ebuild = kwargs.get('ebuild')
+ changed = kwargs.get('changed')
+ pkg = kwargs.get('pkg')
+ if not self.vcs_settings.vcs_preserves_mtime:
+ if ebuild.ebuild_path not in changed.new_ebuilds and \
+ ebuild.ebuild_path not in changed.ebuilds:
+ pkg.mtime = None
+ return {'continue': False}
+
+ @property
+ def runInEbuilds(self):
+ return (True, [self.check])
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index c8fc245..359d9dd 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -294,6 +294,7 @@ class Scanner(object):
('arches', 'ArchChecks'), ('depend', 'DependChecks'),
('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
+ ('mtime', 'MtimeChecks'),
]:
if mod[0]:
mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -322,10 +323,6 @@ class Scanner(object):
continue
# Syntax Checks
- if not self.vcs_settings.vcs_preserves_mtime:
- if dynamic_data['ebuild'].ebuild_path not in self.changed.new_ebuilds and \
- dynamic_data['ebuild'].ebuild_path not in self.changed.ebuilds:
- dynamic_data['pkg'].mtime = None
try:
# All ebuilds should have utf_8 encoding.
f = io.open(
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/directories/, pym/repoman/
@ 2016-03-12 18:10 Brian Dolbec
0 siblings, 0 replies; 15+ messages in thread
From: Brian Dolbec @ 2016-03-12 18:10 UTC (permalink / raw
To: gentoo-commits
commit: fe0727bf0a5b4b0d27e06c2cb659c27edb259bd0
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 3 23:23:52 2016 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Mar 12 17:57:37 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=fe0727bf
repoman: Migrate code to a new MtimeChecks class in directories plugin
pym/repoman/modules/scan/directories/__init__.py | 9 +++++++++
pym/repoman/modules/scan/directories/mtime.py | 20 ++++++++++++++++++++
pym/repoman/scanner.py | 5 +----
3 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/pym/repoman/modules/scan/directories/__init__.py b/pym/repoman/modules/scan/directories/__init__.py
index bcc6eca..ec18d30 100644
--- a/pym/repoman/modules/scan/directories/__init__.py
+++ b/pym/repoman/modules/scan/directories/__init__.py
@@ -19,6 +19,15 @@ module_spec = {
'func_kwargs': {
},
},
+ 'mtime-module': {
+ 'name': "mtime",
+ 'sourcefile': "mtime",
+ 'class': "MtimeChecks",
+ 'description': doc,
+ 'functions': ['check'],
+ 'func_kwargs': {
+ },
+ },
}
}
diff --git a/pym/repoman/modules/scan/directories/mtime.py b/pym/repoman/modules/scan/directories/mtime.py
new file mode 100644
index 0000000..e25b553
--- /dev/null
+++ b/pym/repoman/modules/scan/directories/mtime.py
@@ -0,0 +1,20 @@
+
+
+class MtimeChecks(object):
+
+ def __init__(self, **kwargs):
+ self.vcs_settings = kwargs.get('vcs_settings')
+
+ def check(self, **kwargs):
+ ebuild = kwargs.get('ebuild')
+ changed = kwargs.get('changed')
+ pkg = kwargs.get('pkg')
+ if not self.vcs_settings.vcs_preserves_mtime:
+ if ebuild.ebuild_path not in changed.new_ebuilds and \
+ ebuild.ebuild_path not in changed.ebuilds:
+ pkg.mtime = None
+ return {'continue': False}
+
+ @property
+ def runInEbuilds(self):
+ return (True, [self.check])
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index c8fc245..359d9dd 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -294,6 +294,7 @@ class Scanner(object):
('arches', 'ArchChecks'), ('depend', 'DependChecks'),
('use_flags', 'USEFlagChecks'), ('ruby', 'RubyEclassChecks'),
('license', 'LicenseChecks'), ('restrict', 'RestrictChecks'),
+ ('mtime', 'MtimeChecks'),
]:
if mod[0]:
mod_class = MODULE_CONTROLLER.get_class(mod[0])
@@ -322,10 +323,6 @@ class Scanner(object):
continue
# Syntax Checks
- if not self.vcs_settings.vcs_preserves_mtime:
- if dynamic_data['ebuild'].ebuild_path not in self.changed.new_ebuilds and \
- dynamic_data['ebuild'].ebuild_path not in self.changed.ebuilds:
- dynamic_data['pkg'].mtime = None
try:
# All ebuilds should have utf_8 encoding.
f = io.open(
^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2016-03-12 18:10 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-18 19:23 [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/directories/, pym/repoman/ Brian Dolbec
-- strict thread matches above, loose matches on Subject: below --
2016-03-12 18:10 Brian Dolbec
2016-03-11 0:41 Brian Dolbec
2016-01-31 20:03 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-22 20:55 Brian Dolbec
2016-01-21 18:30 Brian Dolbec
2016-01-18 19:23 Brian Dolbec
2016-01-11 8:01 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