commit:     1f9d957d838ea7ade379686caedf050d71b1325d
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 16 02:00:20 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Apr 21 16:49:30 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=1f9d957d

repoman: Migrate 'can_force' to the new Fuse class

 pym/repoman/main.py                         | 5 +++--
 pym/repoman/modules/scan/ebuild/isebuild.py | 5 +++--
 pym/repoman/scanner.py                      | 3 +--
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/pym/repoman/main.py b/pym/repoman/main.py
index 337e638..2ccda99 100755
--- a/pym/repoman/main.py
+++ b/pym/repoman/main.py
@@ -25,6 +25,7 @@ from portage.util import formatter
 
 from repoman.actions import Actions
 from repoman.argparser import parse_args
+from repoman.fuse import Fuse
 from repoman.qa_data import (
        format_qa_output, format_qa_output_column, qahelp,
        qawarnings, qacats)
@@ -75,7 +76,7 @@ def repoman_main(argv):
        # Set this to False when an extraordinary issue (generally
        # something other than a QA issue) makes it impossible to
        # commit (like if Manifest generation fails).
-       can_force = True
+       can_force = Fuse()
 
        portdir, portdir_overlay, mydir = 
utilities.FindPortdir(repoman_settings)
        if portdir is None:
@@ -110,7 +111,7 @@ def repoman_main(argv):
        # Perform the main checks
        scanner = Scanner(repo_settings, myreporoot, config_root, options,
                                        vcs_settings, mydir, env)
-       can_force = scanner.scan_pkgs(can_force)
+       scanner.scan_pkgs(can_force)
 
        commitmessage = None
 

diff --git a/pym/repoman/modules/scan/ebuild/isebuild.py 
b/pym/repoman/modules/scan/ebuild/isebuild.py
index 474a874..514d23e 100644
--- a/pym/repoman/modules/scan/ebuild/isebuild.py
+++ b/pym/repoman/modules/scan/ebuild/isebuild.py
@@ -42,6 +42,7 @@ class IsEbuild(ScanBase):
                checkdir = kwargs.get('checkdir')
                xpkg = kwargs.get('xpkg')
                fuse = kwargs.get('validity_fuse')
+               can_force = kwargs.get('can_force')
                self.continue_ = False
                ebuildlist = []
                pkgs = {}
@@ -85,9 +86,9 @@ class IsEbuild(ScanBase):
                        # metadata leads to false positives for several checks, 
and false
                        # positives confuse users.
                        self.continue_ = True
+                       can_force.pop()
 
-               return {'continue': self.continue_, 'pkgs': pkgs,
-                       'can_force': not self.continue_}
+               return {'continue': self.continue_, 'pkgs': pkgs}
 
        @property
        def runInPkgs(self):

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 9c6f5ac..a9f56e9 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -205,7 +205,6 @@ class Scanner(object):
                        self.modules[mod_class.__name__] = 
mod_class(**self.kwargs)
 
        def scan_pkgs(self, can_force):
-               dynamic_data = {'can_force': can_force}
                for xpkg in self.effective_scanlist:
                        xpkg_continue = False
                        # ebuilds and digests added to cvs respectively.
@@ -268,7 +267,7 @@ class Scanner(object):
                        dynamic_data["changelog_modified"] = changelog_path in 
self.changed.changelogs
 
                        self._scan_ebuilds(ebuildlist, dynamic_data)
-               return dynamic_data['can_force']
+               return
 
 
        def _scan_ebuilds(self, ebuildlist, dynamic_data):

Reply via email to