From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 91C14138334 for ; Fri, 30 Aug 2019 17:05:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6694DE0848; Fri, 30 Aug 2019 17:05:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4D31AE0848 for ; Fri, 30 Aug 2019 17:05:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C68C634A6F0 for ; Fri, 30 Aug 2019 17:05:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3B28F77B for ; Fri, 30 Aug 2019 17:05:26 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1567106839.af9574c902d4844d2d85fa954f5b1cf1ef7adda8.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/glsa-check X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: af9574c902d4844d2d85fa954f5b1cf1ef7adda8 X-VCS-Branch: master Date: Fri, 30 Aug 2019 17:05:26 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9e9b3911-42a9-4d83-a092-59d5d0c674a3 X-Archives-Hash: c74980f552f367031535bbdb6a8b0bf5 commit: af9574c902d4844d2d85fa954f5b1cf1ef7adda8 Author: Zac Medico gentoo org> AuthorDate: Thu Aug 29 18:30:58 2019 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Aug 29 19:27:19 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=af9574c9 glsa-check: Hide non-vuln glsas in quiet mode This patch is a forward port of the following commit: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=d3e4aad5a03efbd5089f96558d2ddd1e9bf158a8 commit d3e4aad5a03efbd5089f96558d2ddd1e9bf158a8 Author: vapier gentoo.org> AuthorDate: 2010-03-07 01:37:57 +0000 Commit: vapier gentoo.org> CommitDate: 2010-03-07 01:37:57 +0000 glsa-check: hide non-vuln glsas in quiet mode svn path=/trunk/gentoolkit/; revision=750 Bug: https://bugs.gentoo.org/692872 Signed-off-by: Zac Medico gentoo.org> bin/glsa-check | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/bin/glsa-check b/bin/glsa-check index bfcbaa61f..f6c744d84 100755 --- a/bin/glsa-check +++ b/bin/glsa-check @@ -222,10 +222,14 @@ if mode in ["dump", "fix", "inject", "pretend"]: if mode == "dump": myglsa.dump() elif mode == "fix": - sys.stdout.write("Fixing GLSA "+myid+"\n") + if not quiet: + sys.stdout.write("Fixing GLSA "+myid+"\n") if not myglsa.isVulnerable(): - sys.stdout.write(">>> no vulnerable packages installed\n") + if not quiet: + sys.stdout.write(">>> no vulnerable packages installed\n") else: + if quiet: + sys.stdout.write("Fixing GLSA "+myid+"\n") mergelist = myglsa.getMergeList(least_change=least_change) if mergelist == []: sys.stdout.write(">>> cannot fix GLSA, no unaffected packages available\n") @@ -247,10 +251,14 @@ if mode in ["dump", "fix", "inject", "pretend"]: if len(mergelist): sys.stdout.write("\n") elif mode == "pretend": - sys.stdout.write("Checking GLSA "+myid+"\n") + if not quiet: + sys.stdout.write("Checking GLSA "+myid+"\n") if not myglsa.isVulnerable(): - sys.stdout.write(">>> no vulnerable packages installed\n") + if not quiet: + sys.stdout.write(">>> no vulnerable packages installed\n") else: + if quiet: + sys.stdout.write("Checking GLSA "+myid+"\n") mergedict = {} for (vuln, update) in myglsa.getAffectionTable(least_change=least_change): mergedict.setdefault(update, []).append(vuln)