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 B2EC0138334 for ; Sun, 1 Sep 2019 19:03:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0473FE089A; Sun, 1 Sep 2019 19:03:35 +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 DE8B9E089A for ; Sun, 1 Sep 2019 19:03: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-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CC1EE34A8B3 for ; Sun, 1 Sep 2019 19:03:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7CFE173E for ; Sun, 1 Sep 2019 19:03:32 +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: <1567362550.a17c3627190aa2e9594220b22f9f1acf46c81d2f.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: a17c3627190aa2e9594220b22f9f1acf46c81d2f X-VCS-Branch: master Date: Sun, 1 Sep 2019 19:03:32 +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: 5eb0b1a9-ab8b-49f2-a4f9-87f9b10f64f9 X-Archives-Hash: e66e2179fbc9504608ea2206e8ea1d10 commit: a17c3627190aa2e9594220b22f9f1acf46c81d2f Author: Zac Medico gentoo org> AuthorDate: Sun Sep 1 04:36:05 2019 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Sep 1 18:29:10 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=a17c3627 glsa-check: add --reverse option (bug 235970) Add --reverse option which causes GLSAs to be listed in reverse order, so that the most recent GLSAs are listed earlier. Suggested-by: Pavel Sanda twin.jikos.cz> Bug: https://bugs.gentoo.org/235970 Signed-off-by: Zac Medico gentoo.org> bin/glsa-check | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/glsa-check b/bin/glsa-check index 6bb2ee21e..eff01cf31 100755 --- a/bin/glsa-check +++ b/bin/glsa-check @@ -68,6 +68,8 @@ parser.add_argument("-e", "--emergelike", action="store_false", dest="least_chan help="Upgrade to latest version (not least-change)") parser.add_argument("-c", "--cve", action="store_true", dest="list_cve", help="Show CVE IDs in listing mode") +parser.add_argument("-r", "--reverse", action="store_true", dest="reverse", + help="List GLSAs in reverse order") options, params = parser.parse_known_args() @@ -163,8 +165,7 @@ def summarylist(myglsalist, fd1=sys.stdout, fd2=sys.stderr, encoding="utf-8"): fd2.write(green("[U]")+" means the system is not affected and\n") fd2.write(red("[N]")+" indicates that the system might be affected.\n\n") - myglsalist.sort() - for myid in myglsalist: + for myid in sorted(myglsalist, reverse=options.reverse): try: myglsa = Glsa(myid, portage.settings, vardb, portdb) except (GlsaTypeException, GlsaFormatException) as e: