Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 63087 Details for
Bug 98589
glsa-check-0.5.1 updates
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
gentoolkit-glsa-check-0.5.1.patch
gentoolkit-glsa-check-0.5.1.patch (text/plain), 4.31 KB, created by
solar (RETIRED)
on 2005-07-10 12:02:21 UTC
(
hide
)
Description:
gentoolkit-glsa-check-0.5.1.patch
Filename:
MIME Type:
Creator:
solar (RETIRED)
Created:
2005-07-10 12:02:21 UTC
Size:
4.31 KB
patch
obsolete
>--- ./src/glsa-check/glsa-check 2005-07-10 11:25:59.000000000 -0400 >+++ ./src/glsa-check/glsa-check 2005-07-10 14:23:57.000000000 -0400 >@@ -11,7 +11,7 @@ > > __program__ = "glsa-check" > __author__ = "Marius Mauch <genone@gentoo.org>" >-__version__ = "0.5" >+__version__ = "0.5.1" > > optionmap = [ > ["-l", "--list", "list all unapplied GLSA"], >@@ -24,22 +24,18 @@ > ["-h", "--help", "show this help message"], > ["-V", "--version", "some information about this tool"], > ["-v", "--verbose", "print more messages (option)"], >+["-q", "--quiet", "don't print startup message"], >+["-c", "--cve", "print startup message"], > ] > >-# print a warning as this is beta code >-sys.stderr.write("WARNING: This tool is completely new and not very tested, so it should not be\n") >-sys.stderr.write("used on production systems. It's mainly a test tool for the new GLSA release\n") >-sys.stderr.write("and distribution system, it's functionality will later be merged into emerge\n") >-sys.stderr.write("and equery.\n") >-sys.stderr.write("Please read http://www.gentoo.org/proj/en/portage/glsa-integration.xml\n") >-sys.stderr.write("before using this tool AND before reporting a bug.\n\n") >- > # option parsing >+quiet = False >+cve = False > args = [] > params = [] > try: >- args, params = getopt(sys.argv[1:], "dplfchinvVt", \ >- ["dump", "print", "list", "pretend", "fix", "inject", "help", "info", "version", "test", "nocolor"]) >+ args, params = getopt(sys.argv[1:], "dplfchinvVtqc", \ >+ ["dump", "print", "list", "pretend", "fix", "inject", "help", "info", "version", "test", "nocolor", "quiet", "cve"]) > args = [a for a,b in args] > > for option in ["--nocolor", "-n"]: >@@ -52,6 +48,17 @@ > if option in args: > verbose = True > args.remove(option) >+ >+ for option in ["--quiet", "-q"]: >+ if option in args: >+ quiet = True >+ verbose = False >+ args.remove(option) >+ >+ for option in ["--cve", "-c"]: >+ if option in args: >+ cve = True >+ args.remove(option) > > # sanity checking > if len(args) <= 0: >@@ -71,6 +78,16 @@ > print "unknown option given:", e > mode = "help" > >+ >+# print a warning as this is beta code >+if quiet == False: >+ sys.stderr.write("WARNING: This tool is completely new and not very tested, so it should not be\n") >+ sys.stderr.write("used on production systems. It's mainly a test tool for the new GLSA release\n") >+ sys.stderr.write("and distribution system, it's functionality will later be merged into emerge\n") >+ sys.stderr.write("and equery.\n") >+ sys.stderr.write("Please read http://www.gentoo.org/proj/en/portage/glsa-integration.xml\n") >+ sys.stderr.write("before using this tool AND before reporting a bug.\n\n") >+ > # we need a set of glsa for most operation modes > if len(params) <= 0 and mode in ["fix", "test", "pretend", "dump", "inject"]: > print >@@ -129,10 +146,13 @@ > todolist = [e for e in completelist if e not in checklist] > > glsalist = [] >+new_only = False > if "new" in params: >+ new_only = True > glsalist = todolist > params.remove("new") > if "all" in params: >+ new_only = False > glsalist = completelist > params.remove("all") > >@@ -146,10 +166,11 @@ > > # list short information for given or new GLSA > if mode == "list": >- print white("[A]")+" means this GLSA was already applied," >- print green("[U]")+" means the system is not affected and" >- print red("[N]")+" indicates that the system might be affected." >- print >+ if not (quiet): >+ print white("[A]")+" means this GLSA was already applied," >+ print green("[U]")+" means the system is not affected and" >+ print red("[N]")+" indicates that the system might be affected." >+ print > for myid in glsalist: > try: > myglsa = Glsa(myid, glsaconfig) >@@ -157,21 +178,31 @@ > if verbose: > print "invalid GLSA: %s (error message was: %s)" % (myid, e) > continue >+ vuln = False > if myglsa.isApplied(): > status = "[A]" > color = white > elif myglsa.isVulnerable(): >+ vuln = True > status = "[N]" > color = red > else: > status = "[U]" > color = green >+ if (new_only and not vuln): >+ continue; > print color(myglsa.nr), color(status), myglsa.title, "(", > for pkg in myglsa.packages.keys()[:3]: > print pkg, > if len(myglsa.packages) > 3: > print "...", >- print ")" >+ print ")", >+ if cve: >+ for ref in myglsa.references: >+ if ref[0:4] == "CAN-": >+ print ref[0:13], >+ print >+ > sys.exit(0) > > # dump, fix, inject and fix are nearly the same code, only the glsa method call differs
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 98589
: 63087