From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D05D459CA4 for ; Thu, 10 Mar 2016 22:39:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3654421C019; Thu, 10 Mar 2016 22:39:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8F6E021C019 for ; Thu, 10 Mar 2016 22:39:34 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 395DC340D1A for ; Thu, 10 Mar 2016 22:39:33 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7091D208D for ; Thu, 10 Mar 2016 22:39:30 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1457643495.50375654bfd565e9ea143d379f711e3a6c2eb167.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/actions.py pym/repoman/scanner.py X-VCS-Directories: pym/repoman/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 50375654bfd565e9ea143d379f711e3a6c2eb167 X-VCS-Branch: master Date: Thu, 10 Mar 2016 22:39:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a6692f9c-8c1c-4f23-9c25-afd36af60b05 X-Archives-Hash: 12ce55c288da62dd73f8fc4c6b01cd3b commit: 50375654bfd565e9ea143d379f711e3a6c2eb167 Author: Brian Dolbec gentoo org> AuthorDate: Thu Mar 10 16:11:51 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Thu Mar 10 20:58:15 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=50375654 repoman: Make the output quiet 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..."))