[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-portage-dev
Subject:    [gentoo-portage-dev] [PATCH 3/3] glsa-check: Remove 'new' target from glsa-list
From:       Zac Medico <zmedico () gentoo ! org>
Date:       2019-08-30 23:03:14
Message-ID: 20190830230314.7597-4-zmedico () gentoo ! org
[Download RAW message or body]

This patch is a forward port of the following commit:

https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=8190a7299a618e0ce120fe1c894b944075576342

commit 8190a7299a618e0ce120fe1c894b944075576342
Author:     rbu <rbu@gentoo.org>
AuthorDate: 2009-08-18 18:25:59 +0000
Commit:     rbu <rbu@gentoo.org>
CommitDate: 2009-08-18 18:25:59 +0000

    Remove 'new' target from glsa-list

    Everyone should use 'affected' or 'all'
    Update man page and changelog

    svn path=/trunk/gentoolkit/; revision=672

Bug: https://bugs.gentoo.org/693088
Signed-off-by: Zac Medico <zmedico@gentoo.org>
---
 bin/glsa-check | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/bin/glsa-check b/bin/glsa-check
index bf81eca63..7a6916d15 100755
--- a/bin/glsa-check
+++ b/bin/glsa-check
@@ -26,7 +26,7 @@ __version__ = "1.0.1"
 # option parsing
 epilog = "glsa-list can contain an arbitrary number of GLSA ids," \
 		" filenames containing GLSAs or the special identifiers" \
-		" 'all', 'new' and 'affected'"
+		" 'all' and 'affected'"
 parser = argparse.ArgumentParser(usage=__program__ + " <option> [glsa-id | all | new | affected]",
 	epilog=epilog)
 
@@ -64,7 +64,7 @@ parser.add_argument("-v", "--verbose", action="store_true", dest="verbose",
 parser.add_argument("-n", "--nocolor", action="store_true",
 		help="Removes color from output")
 parser.add_argument("-e", "--emergelike", action="store_false", dest="least_change",
-		help="Do not use a least-change algorithm")
+		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")
 
@@ -101,7 +101,7 @@ elif mode in ["fix", "inject"] and os.geteuid() != 0:
 	sys.stderr.write("\nThis tool needs root access to "+options.mode+" this GLSA\n\n")
 	sys.exit(2)
 elif mode == "list" and not params:
-	params.append("new")
+	params.append("affected")
 
 # delay this for speed increase
 from portage.glsa import (Glsa, GlsaTypeException, GlsaFormatException,
@@ -119,14 +119,15 @@ todolist = [e for e in completelist if e not in checklist]
 
 glsalist = []
 if "new" in params:
-	glsalist = todolist
 	params.remove("new")
+	sys.stderr.write("Warning: The 'new' glsa-list target has been removed, using 'affected'.\n")
+	params.append("affected")
 
 if "all" in params:
 	glsalist = completelist
 	params.remove("all")
+
 if "affected" in params:
-	# replaced completelist with todolist on request of wschlich
 	for x in todolist:
 		try:
 			myglsa = Glsa(x, portage.settings, vardb, portdb)
-- 
2.21.0


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic