1 |
commit: 3f7858731cbdd03298831df7e44b774b5fbcc541 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 7 23:04:14 2015 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 7 23:08:08 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=3f785873 |
7 |
|
8 |
scanner.py: Fix options.output_style for column output (bug 534022) |
9 |
|
10 |
Ever since commit: 310c548e708f72ba25d66a423b679b24888ed863 |
11 |
the column format output has broken machine readable or grep output. |
12 |
This patch selectively applies the newlines and pformat of the atoms. |
13 |
|
14 |
pym/repoman/scanner.py | 26 +++++++++++++++++++------- |
15 |
1 file changed, 19 insertions(+), 7 deletions(-) |
16 |
|
17 |
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py |
18 |
index 0194017..df46144 100644 |
19 |
--- a/pym/repoman/scanner.py |
20 |
+++ b/pym/repoman/scanner.py |
21 |
@@ -689,15 +689,27 @@ class Scanner(object): |
22 |
# if we emptied out our list, continue: |
23 |
if not atoms: |
24 |
continue |
25 |
+ if self.options.output_style in ['column']: |
26 |
+ self.qatracker.add_error(mykey, |
27 |
+ "%s: %s: %s(%s) %s" |
28 |
+ % (ebuild.relative_path, mytype, keyword, |
29 |
+ prof, repr(atoms))) |
30 |
+ else: |
31 |
+ self.qatracker.add_error(mykey, |
32 |
+ "%s: %s: %s(%s)\n%s" |
33 |
+ % (ebuild.relative_path, mytype, keyword, |
34 |
+ prof, pformat(atoms, indent=6))) |
35 |
+ else: |
36 |
+ if self.options.output_style in ['column']: |
37 |
+ self.qatracker.add_error(mykey, |
38 |
+ "%s: %s: %s(%s) %s" |
39 |
+ % (ebuild.relative_path, mytype, keyword, |
40 |
+ prof, repr(atoms))) |
41 |
+ else: |
42 |
self.qatracker.add_error(mykey, |
43 |
"%s: %s: %s(%s)\n%s" |
44 |
- % (ebuild.relative_path, mytype, keyword, prof, |
45 |
- pformat(atoms, indent=6))) |
46 |
- else: |
47 |
- self.qatracker.add_error(mykey, |
48 |
- "%s: %s: %s(%s)\n%s" |
49 |
- % (ebuild.relative_path, mytype, keyword, prof, |
50 |
- pformat(atoms, indent=6))) |
51 |
+ % (ebuild.relative_path, mytype, keyword, |
52 |
+ prof, pformat(atoms, indent=6))) |
53 |
|
54 |
if not baddepsyntax and unknown_pkgs: |
55 |
type_map = {} |