1 |
commit: 82797924dcc6dbfcca22067633cd160ead1199a7 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 30 22:52:51 2019 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 31 03:14:21 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=82797924 |
7 |
|
8 |
glsa-check: Remove 'new' target from glsa-list |
9 |
|
10 |
This patch is a forward port of the following commit: |
11 |
|
12 |
https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=8190a7299a618e0ce120fe1c894b944075576342 |
13 |
|
14 |
commit 8190a7299a618e0ce120fe1c894b944075576342 |
15 |
Author: rbu <rbu <AT> gentoo.org> |
16 |
AuthorDate: 2009-08-18 18:25:59 +0000 |
17 |
Commit: rbu <rbu <AT> gentoo.org> |
18 |
CommitDate: 2009-08-18 18:25:59 +0000 |
19 |
|
20 |
Remove 'new' target from glsa-list |
21 |
|
22 |
Everyone should use 'affected' or 'all' |
23 |
Update man page and changelog |
24 |
|
25 |
svn path=/trunk/gentoolkit/; revision=672 |
26 |
|
27 |
Bug: https://bugs.gentoo.org/693088 |
28 |
Acked-by: Aaron Bauman <bman <AT> gentoo.org> |
29 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
30 |
|
31 |
bin/glsa-check | 11 ++++++----- |
32 |
1 file changed, 6 insertions(+), 5 deletions(-) |
33 |
|
34 |
diff --git a/bin/glsa-check b/bin/glsa-check |
35 |
index bf81eca63..7a6916d15 100755 |
36 |
--- a/bin/glsa-check |
37 |
+++ b/bin/glsa-check |
38 |
@@ -26,7 +26,7 @@ __version__ = "1.0.1" |
39 |
# option parsing |
40 |
epilog = "glsa-list can contain an arbitrary number of GLSA ids," \ |
41 |
" filenames containing GLSAs or the special identifiers" \ |
42 |
- " 'all', 'new' and 'affected'" |
43 |
+ " 'all' and 'affected'" |
44 |
parser = argparse.ArgumentParser(usage=__program__ + " <option> [glsa-id | all | new | affected]", |
45 |
epilog=epilog) |
46 |
|
47 |
@@ -64,7 +64,7 @@ parser.add_argument("-v", "--verbose", action="store_true", dest="verbose", |
48 |
parser.add_argument("-n", "--nocolor", action="store_true", |
49 |
help="Removes color from output") |
50 |
parser.add_argument("-e", "--emergelike", action="store_false", dest="least_change", |
51 |
- help="Do not use a least-change algorithm") |
52 |
+ help="Upgrade to latest version (not least-change)") |
53 |
parser.add_argument("-c", "--cve", action="store_true", dest="list_cve", |
54 |
help="Show CVE IDs in listing mode") |
55 |
|
56 |
@@ -101,7 +101,7 @@ elif mode in ["fix", "inject"] and os.geteuid() != 0: |
57 |
sys.stderr.write("\nThis tool needs root access to "+options.mode+" this GLSA\n\n") |
58 |
sys.exit(2) |
59 |
elif mode == "list" and not params: |
60 |
- params.append("new") |
61 |
+ params.append("affected") |
62 |
|
63 |
# delay this for speed increase |
64 |
from portage.glsa import (Glsa, GlsaTypeException, GlsaFormatException, |
65 |
@@ -119,14 +119,15 @@ todolist = [e for e in completelist if e not in checklist] |
66 |
|
67 |
glsalist = [] |
68 |
if "new" in params: |
69 |
- glsalist = todolist |
70 |
params.remove("new") |
71 |
+ sys.stderr.write("Warning: The 'new' glsa-list target has been removed, using 'affected'.\n") |
72 |
+ params.append("affected") |
73 |
|
74 |
if "all" in params: |
75 |
glsalist = completelist |
76 |
params.remove("all") |
77 |
+ |
78 |
if "affected" in params: |
79 |
- # replaced completelist with todolist on request of wschlich |
80 |
for x in todolist: |
81 |
try: |
82 |
myglsa = Glsa(x, portage.settings, vardb, portdb) |