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 97D1F59CA3 for ; Thu, 10 Mar 2016 16:31:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A85E021C027; Thu, 10 Mar 2016 16:31:05 +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 0E0BA21C00B for ; Thu, 10 Mar 2016 16:31:04 +0000 (UTC) Received: from professor-x (S010634bdfa9ecf80.vc.shawcable.net [96.49.31.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id C1B3534094F for ; Thu, 10 Mar 2016 16:31:03 +0000 (UTC) Date: Thu, 10 Mar 2016 08:30:07 -0800 From: Brian Dolbec To: gentoo-portage-dev@lists.gentoo.org Subject: [gentoo-portage-dev] [PATCH] repoman: Make the output qiuet when options.quiet=True (bug 576958) Message-ID: <20160310083007.23f7ee47.dolsen@gentoo.org> Organization: Gentoo Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 95242d2b-ab96-4e87-a06e-903ba55fc22c X-Archives-Hash: 9cdc66b192b4d77b255278751573aa16 =46rom e13e87a38f404a95ec7705f9fd8920201b632f42 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Thu, 10 Mar 2016 08:11:51 -0800 Subject: [PATCH] repoman: Make the output qiuet when options.quiet=3DTrue (= 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=3D576958 --- 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): =20 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 !=3D 'commit': self._non_commit(result) @@ -199,6 +200,8 @@ class Actions(object): =20 self.add_manifest(mymanifests, myheaders, myupdates, myremoved, commitme= ssage) =20 + 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) =20 =20 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 =3D self.vcs_settings.vcs in ('cvs',= 'svn') self.check['changelog'] =3D not is_echangelog_enabled and self.vcs_setti= ngs.vcs_is_cvs_or_svn =20 - if self.options.mode =3D=3D "manifest": + if self.options.mode =3D=3D "manifest" or self.options.quiet: pass elif self.options.pretend: print(green("\nRepoMan does a once-over of the neighborhood...")) --=20 2.7.2