From: Brian Dolbec <dolsen@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: [gentoo-portage-dev] [PATCH] repoman: Make the output qiuet when options.quiet=True (bug 576958)
Date: Thu, 10 Mar 2016 08:30:07 -0800 [thread overview]
Message-ID: <20160310083007.23f7ee47.dolsen@gentoo.org> (raw)
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
next reply other threads:[~2016-03-10 16:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-10 16:30 Brian Dolbec [this message]
2016-03-10 17:36 ` [gentoo-portage-dev] [PATCH] repoman: Make the output qiuet when options.quiet=True (bug 576958) Zac Medico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160310083007.23f7ee47.dolsen@gentoo.org \
--to=dolsen@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox