diff options
Diffstat (limited to 'pym/kernelcheck/lib/kernellib.py')
-rw-r--r-- | pym/kernelcheck/lib/kernellib.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/pym/kernelcheck/lib/kernellib.py b/pym/kernelcheck/lib/kernellib.py index e593d02..9ad1a55 100644 --- a/pym/kernelcheck/lib/kernellib.py +++ b/pym/kernelcheck/lib/kernellib.py @@ -398,13 +398,16 @@ def extract_genpatch(ebuild, directory, sources): return genpatch -def parse_cve_files(directory): +def parse_cve_files(directory, spinner=None): 'Returns all bug files as list' files = list() if (os.path.exists(directory)): for item in os.listdir(directory): + if spinner: + spinner.update() + try: cve_file = read_cve_file(directory, item) if cve_file is not None: @@ -430,7 +433,7 @@ def find_cve(cve, directory): def eval_cve_files(directory, kernel, spinner=None): 'Returns a vulnerabilty evaluation' - files = parse_cve_files(directory) + files = parse_cve_files(directory, spinner) if not files: return None @@ -627,7 +630,7 @@ def extract_version(release): return kernel -def all_version(source): +def all_version(source, spinner=None): """ Given a kernel source name (e.g. vanilla), returns a Kernel object for the latest revision in the tree, or None if none exists. """ @@ -638,6 +641,9 @@ def all_version(source): 'sys-kernel/%s-sources' % source) for item in matches: + if spinner: + spinner.update() + best = portage.versions.catpkgsplit(item) if not best: continue @@ -657,7 +663,7 @@ def eval_kernel_updates(kernel, kernel_eval, spinner): index = 0 kernel_dict = dict() - for compare in all_version(kernel.source): + for compare in all_version(kernel.source, spinner): if compare.version > kernel.version or \ (compare.version == kernel.version and \ compare.revision > kernel.revision): |