1 |
Add --reverse option which causes GLSAs to be listed in reverse order, |
2 |
so that the most recent GLSAs are listed earlier. |
3 |
|
4 |
Suggested-by: Pavel Sanda <ps@××××××××××.cz> |
5 |
Bug: https://bugs.gentoo.org/235970 |
6 |
Signed-off-by: Zac Medico <zmedico@g.o> |
7 |
--- |
8 |
bin/glsa-check | 5 +++-- |
9 |
1 file changed, 3 insertions(+), 2 deletions(-) |
10 |
|
11 |
diff --git a/bin/glsa-check b/bin/glsa-check |
12 |
index 95ef16fde..6dbb7513c 100755 |
13 |
--- a/bin/glsa-check |
14 |
+++ b/bin/glsa-check |
15 |
@@ -67,6 +67,8 @@ parser.add_argument("-e", "--emergelike", action="store_false", dest="least_chan |
16 |
help="Upgrade to latest version (not least-change)") |
17 |
parser.add_argument("-c", "--cve", action="store_true", dest="list_cve", |
18 |
help="Show CVE IDs in listing mode") |
19 |
+parser.add_argument("-r", "--reverse", action="store_true", dest="reverse", |
20 |
+ help="List GLSAs in reverse order") |
21 |
|
22 |
options, params = parser.parse_known_args() |
23 |
|
24 |
@@ -162,8 +164,7 @@ def summarylist(myglsalist, fd1=sys.stdout, fd2=sys.stderr, encoding="utf-8"): |
25 |
fd2.write(green("[U]")+" means the system is not affected and\n") |
26 |
fd2.write(red("[N]")+" indicates that the system might be affected.\n\n") |
27 |
|
28 |
- myglsalist.sort() |
29 |
- for myid in myglsalist: |
30 |
+ for myid in sorted(myglsalist, reverse=options.reverse): |
31 |
try: |
32 |
myglsa = Glsa(myid, portage.settings, vardb, portdb) |
33 |
except (GlsaTypeException, GlsaFormatException) as e: |
34 |
-- |
35 |
2.21.0 |