#!/usr/bin/python -b # Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 from __future__ import print_function, unicode_literals import argparse import re import sys import codecs from functools import reduce import operator from os import path as osp if osp.isfile(osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), ".portage_not_installed")): sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "lib")) import portage portage._internal_caller = True from portage import os from portage.glsa import match from portage.output import green, red, nocolor, white __program__ = "glsa-check" __author__ = "Marius Mauch " __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' and 'affected'" parser = argparse.ArgumentParser(usage=__program__ + "