1 |
commit: 45f57e9b8dc5c582e786a7eb7d8679abd59958fe |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 16 02:00:20 2016 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 25 15:28:53 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=45f57e9b |
7 |
|
8 |
repoman: Migrate 'can_force' to the new Fuse class |
9 |
|
10 |
pym/repoman/main.py | 5 +++-- |
11 |
pym/repoman/modules/scan/ebuild/isebuild.py | 5 +++-- |
12 |
pym/repoman/scanner.py | 3 +-- |
13 |
3 files changed, 7 insertions(+), 6 deletions(-) |
14 |
|
15 |
diff --git a/pym/repoman/main.py b/pym/repoman/main.py |
16 |
index 337e638..2ccda99 100755 |
17 |
--- a/pym/repoman/main.py |
18 |
+++ b/pym/repoman/main.py |
19 |
@@ -25,6 +25,7 @@ from portage.util import formatter |
20 |
|
21 |
from repoman.actions import Actions |
22 |
from repoman.argparser import parse_args |
23 |
+from repoman.fuse import Fuse |
24 |
from repoman.qa_data import ( |
25 |
format_qa_output, format_qa_output_column, qahelp, |
26 |
qawarnings, qacats) |
27 |
@@ -75,7 +76,7 @@ def repoman_main(argv): |
28 |
# Set this to False when an extraordinary issue (generally |
29 |
# something other than a QA issue) makes it impossible to |
30 |
# commit (like if Manifest generation fails). |
31 |
- can_force = True |
32 |
+ can_force = Fuse() |
33 |
|
34 |
portdir, portdir_overlay, mydir = utilities.FindPortdir(repoman_settings) |
35 |
if portdir is None: |
36 |
@@ -110,7 +111,7 @@ def repoman_main(argv): |
37 |
# Perform the main checks |
38 |
scanner = Scanner(repo_settings, myreporoot, config_root, options, |
39 |
vcs_settings, mydir, env) |
40 |
- can_force = scanner.scan_pkgs(can_force) |
41 |
+ scanner.scan_pkgs(can_force) |
42 |
|
43 |
commitmessage = None |
44 |
|
45 |
|
46 |
diff --git a/pym/repoman/modules/scan/ebuild/isebuild.py b/pym/repoman/modules/scan/ebuild/isebuild.py |
47 |
index 474a874..514d23e 100644 |
48 |
--- a/pym/repoman/modules/scan/ebuild/isebuild.py |
49 |
+++ b/pym/repoman/modules/scan/ebuild/isebuild.py |
50 |
@@ -42,6 +42,7 @@ class IsEbuild(ScanBase): |
51 |
checkdir = kwargs.get('checkdir') |
52 |
xpkg = kwargs.get('xpkg') |
53 |
fuse = kwargs.get('validity_fuse') |
54 |
+ can_force = kwargs.get('can_force') |
55 |
self.continue_ = False |
56 |
ebuildlist = [] |
57 |
pkgs = {} |
58 |
@@ -85,9 +86,9 @@ class IsEbuild(ScanBase): |
59 |
# metadata leads to false positives for several checks, and false |
60 |
# positives confuse users. |
61 |
self.continue_ = True |
62 |
+ can_force.pop() |
63 |
|
64 |
- return {'continue': self.continue_, 'pkgs': pkgs, |
65 |
- 'can_force': not self.continue_} |
66 |
+ return {'continue': self.continue_, 'pkgs': pkgs} |
67 |
|
68 |
@property |
69 |
def runInPkgs(self): |
70 |
|
71 |
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py |
72 |
index 9c6f5ac..a9f56e9 100644 |
73 |
--- a/pym/repoman/scanner.py |
74 |
+++ b/pym/repoman/scanner.py |
75 |
@@ -205,7 +205,6 @@ class Scanner(object): |
76 |
self.modules[mod_class.__name__] = mod_class(**self.kwargs) |
77 |
|
78 |
def scan_pkgs(self, can_force): |
79 |
- dynamic_data = {'can_force': can_force} |
80 |
for xpkg in self.effective_scanlist: |
81 |
xpkg_continue = False |
82 |
# ebuilds and digests added to cvs respectively. |
83 |
@@ -268,7 +267,7 @@ class Scanner(object): |
84 |
dynamic_data["changelog_modified"] = changelog_path in self.changed.changelogs |
85 |
|
86 |
self._scan_ebuilds(ebuildlist, dynamic_data) |
87 |
- return dynamic_data['can_force'] |
88 |
+ return |
89 |
|
90 |
|
91 |
def _scan_ebuilds(self, ebuildlist, dynamic_data): |