commit: 3f7858731cbdd03298831df7e44b774b5fbcc541 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Wed Oct 7 23:04:14 2015 +0000 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> CommitDate: Wed Oct 7 23:08:08 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=3f785873
scanner.py: Fix options.output_style for column output (bug 534022)
Ever since commit: 310c548e708f72ba25d66a423b679b24888ed863
the column format output has broken machine readable or grep output.
This patch selectively applies the newlines and pformat of the atoms.
pym/repoman/scanner.py | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 0194017..df46144 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -689,15 +689,27 @@ class Scanner(object):
# if we emptied
out our list, continue:
if not atoms:
continue
+ if
self.options.output_style in ['column']:
+
self.qatracker.add_error(mykey,
+
"%s: %s: %s(%s) %s"
+
% (ebuild.relative_path, mytype, keyword,
+
prof, repr(atoms)))
+ else:
+
self.qatracker.add_error(mykey,
+
"%s: %s: %s(%s)\n%s"
+
% (ebuild.relative_path, mytype, keyword,
+
prof, pformat(atoms, indent=6)))
+ else:
+ if
self.options.output_style in ['column']:
+
self.qatracker.add_error(mykey,
+ "%s:
%s: %s(%s) %s"
+ %
(ebuild.relative_path, mytype, keyword,
+
prof, repr(atoms)))
+ else:
self.qatracker.add_error(mykey,
"%s:
%s: %s(%s)\n%s"
- %
(ebuild.relative_path, mytype, keyword, prof,
-
pformat(atoms, indent=6)))
- else:
-
self.qatracker.add_error(mykey,
- "%s: %s:
%s(%s)\n%s"
- %
(ebuild.relative_path, mytype, keyword, prof,
-
pformat(atoms, indent=6)))
+ %
(ebuild.relative_path, mytype, keyword,
+
prof, pformat(atoms, indent=6)))
if not baddepsyntax and unknown_pkgs:
type_map = {}
