* [gentoo-portage-dev] [PATCH] repoman: Make the output qiuet when options.quiet=True (bug 576958)
@ 2016-03-10 16:30 Brian Dolbec
2016-03-10 17:36 ` Zac Medico
0 siblings, 1 reply; 2+ messages in thread
From: Brian Dolbec @ 2016-03-10 16:30 UTC (permalink / raw
To: gentoo-portage-dev
From e13e87a38f404a95ec7705f9fd8920201b632f42 Mon Sep 17 00:00:00 2001
From: Brian Dolbec <dolsen@gentoo.org>
Date: Thu, 10 Mar 2016 08:11:51 -0800
Subject: [PATCH] repoman: Make the output qiuet when options.quiet=True (bug 576958)
In some cases do not output anything.
In some cases, output a simplified error message
X-Gentoo-bug: 576958
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=576958
---
pym/repoman/actions.py | 29 ++++++++++++++++++++---------
pym/repoman/scanner.py | 2 +-
2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/pym/repoman/actions.py b/pym/repoman/actions.py
index f461703..4f3f195 100644
--- a/pym/repoman/actions.py
+++ b/pym/repoman/actions.py
@@ -57,7 +57,8 @@ class Actions(object):
def inform(self, can_force, result):
'''Inform the user of all the problems found'''
- if self.suggest['ignore_masked'] or self.suggest['include_dev']:
+ if ((self.suggest['ignore_masked'] or self.suggest['include_dev'])
+ and not self.options.quiet):
self._suggest()
if self.options.mode != 'commit':
self._non_commit(result)
@@ -199,6 +200,8 @@ class Actions(object):
self.add_manifest(mymanifests, myheaders, myupdates, myremoved, commitmessage)
+ if self.options.quiet:
+ return
print()
if self.vcs_settings.vcs:
print("Commit complete.")
@@ -230,17 +233,25 @@ class Actions(object):
if result['full']:
print(bold("Note: type \"repoman full\" for a complete listing."))
if result['warn'] and not result['fail']:
- utilities.repoman_sez(
- "\"You're only giving me a partial QA payment?\n"
- " I'll take it this time, but I'm not happy.\"")
+ if self.options.quiet:
+ print(bold("Non-Fatal QA errors found"))
+ else:
+ utilities.repoman_sez(
+ "\"You're only giving me a partial QA payment?\n"
+ " I'll take it this time, but I'm not happy.\""
+ )
elif not result['fail']:
- utilities.repoman_sez(
- "\"If everyone were like you, I'd be out of business!\"")
+ if self.options.quiet:
+ print("No QA issues found")
+ else:
+ utilities.repoman_sez(
+ "\"If everyone were like you, I'd be out of business!\"")
elif result['fail']:
print(bad("Please fix these important QA issues first."))
- utilities.repoman_sez(
- "\"Make your QA payment on time"
- " and you'll never see the likes of me.\"\n")
+ if not self.options.quiet:
+ utilities.repoman_sez(
+ "\"Make your QA payment on time"
+ " and you'll never see the likes of me.\"\n")
sys.exit(1)
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 84dbdf2..36248cb 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -163,7 +163,7 @@ class Scanner(object):
self.vcs_settings.vcs_is_cvs_or_svn = self.vcs_settings.vcs in ('cvs', 'svn')
self.check['changelog'] = not is_echangelog_enabled and self.vcs_settings.vcs_is_cvs_or_svn
- if self.options.mode == "manifest":
+ if self.options.mode == "manifest" or self.options.quiet:
pass
elif self.options.pretend:
print(green("\nRepoMan does a once-over of the neighborhood..."))
--
2.7.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] repoman: Make the output qiuet when options.quiet=True (bug 576958)
2016-03-10 16:30 [gentoo-portage-dev] [PATCH] repoman: Make the output qiuet when options.quiet=True (bug 576958) Brian Dolbec
@ 2016-03-10 17:36 ` Zac Medico
0 siblings, 0 replies; 2+ messages in thread
From: Zac Medico @ 2016-03-10 17:36 UTC (permalink / raw
To: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 332 bytes --]
On Thu, Mar 10, 2016 at 8:30 AM, Brian Dolbec <dolsen@gentoo.org> wrote:
> From e13e87a38f404a95ec7705f9fd8920201b632f42 Mon Sep 17 00:00:00 2001
> From: Brian Dolbec <dolsen@gentoo.org>
> Date: Thu, 10 Mar 2016 08:11:51 -0800
> Subject: [PATCH] repoman: Make the output qiuet when options.quiet=True
> (bug 576958)
>
Looks good.
[-- Attachment #2: Type: text/html, Size: 695 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-10 17:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-10 16:30 [gentoo-portage-dev] [PATCH] repoman: Make the output qiuet when options.quiet=True (bug 576958) Brian Dolbec
2016-03-10 17:36 ` Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox