Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Sun, 01 Sep 2019 19:03:35
Message-Id: 1567362550.a17c3627190aa2e9594220b22f9f1acf46c81d2f.zmedico@gentoo
1 commit: a17c3627190aa2e9594220b22f9f1acf46c81d2f
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 1 04:36:05 2019 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 1 18:29:10 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=a17c3627
7
8 glsa-check: add --reverse option (bug 235970)
9
10 Add --reverse option which causes GLSAs to be listed in reverse order,
11 so that the most recent GLSAs are listed earlier.
12
13 Suggested-by: Pavel Sanda <ps <AT> twin.jikos.cz>
14 Bug: https://bugs.gentoo.org/235970
15 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
16
17 bin/glsa-check | 5 +++--
18 1 file changed, 3 insertions(+), 2 deletions(-)
19
20 diff --git a/bin/glsa-check b/bin/glsa-check
21 index 6bb2ee21e..eff01cf31 100755
22 --- a/bin/glsa-check
23 +++ b/bin/glsa-check
24 @@ -68,6 +68,8 @@ parser.add_argument("-e", "--emergelike", action="store_false", dest="least_chan
25 help="Upgrade to latest version (not least-change)")
26 parser.add_argument("-c", "--cve", action="store_true", dest="list_cve",
27 help="Show CVE IDs in listing mode")
28 +parser.add_argument("-r", "--reverse", action="store_true", dest="reverse",
29 + help="List GLSAs in reverse order")
30
31 options, params = parser.parse_known_args()
32
33 @@ -163,8 +165,7 @@ def summarylist(myglsalist, fd1=sys.stdout, fd2=sys.stderr, encoding="utf-8"):
34 fd2.write(green("[U]")+" means the system is not affected and\n")
35 fd2.write(red("[N]")+" indicates that the system might be affected.\n\n")
36
37 - myglsalist.sort()
38 - for myid in myglsalist:
39 + for myid in sorted(myglsalist, reverse=options.reverse):
40 try:
41 myglsa = Glsa(myid, portage.settings, vardb, portdb)
42 except (GlsaTypeException, GlsaFormatException) as e: