if mode == "dump":
myglsa.dump()
elif mode == "fix":
- sys.stdout.write("Fixing GLSA "+myid+"\n")
+ if not quiet:
+ sys.stdout.write("Fixing GLSA "+myid+"\n")
if not myglsa.isVulnerable():
- sys.stdout.write(">>> no vulnerable packages installed\n")
+ if not quiet:
+ sys.stdout.write(">>> no vulnerable packages installed\n")
else:
+ if quiet:
+ sys.stdout.write("Fixing GLSA "+myid+"\n")
mergelist = myglsa.getMergeList(least_change=least_change)
if mergelist == []:
sys.stdout.write(">>> cannot fix GLSA, no unaffected packages available\n")
if len(mergelist):
sys.stdout.write("\n")
elif mode == "pretend":
- sys.stdout.write("Checking GLSA "+myid+"\n")
+ if not quiet:
+ sys.stdout.write("Checking GLSA "+myid+"\n")
if not myglsa.isVulnerable():
- sys.stdout.write(">>> no vulnerable packages installed\n")
+ if not quiet:
+ sys.stdout.write(">>> no vulnerable packages installed\n")
else:
+ if quiet:
+ sys.stdout.write("Checking GLSA "+myid+"\n")
mergedict = {}
for (vuln, update) in myglsa.getAffectionTable(least_change=least_change):
mergedict.setdefault(update, []).append(vuln)
if no_upgrades:
sys.stdout.write(">>> No upgrade path exists for these packages:\n")
sys.stdout.write(" " + red(", ".join(no_upgrades)) + "\n")
- sys.stdout.write("\n")
elif mode == "inject":
sys.stdout.write("injecting " + myid + "\n")
myglsa.inject()