import logging import sys from vendors.debian.DebianModel import DebianModel ##### GLOBAL VARIABLES ##### logging.basicConfig(stream=sys.stderr, level=logging.DEBUG) # Increase the recursion limit by much to allow bs to parse large files () sys.setrecursionlimit(6000) secondsperday = 86400 verbosity = 1 ###### FUNCTIONS ###### def aptsec_help(): """ :return: """ print('See manual for correct usage!') def __main__(configfile='config_default.txt', vendorname='debian', action='help'): # support only debian if vendorname is 'debian': model = DebianModel(action) model.performTests() #for norm_param in range(1, 15): # get model as set of opinions # TODO: FIX THE CVSREADER dependency # TODO: for random subsets of packages (that exist in our model), generate prediction_error_values and compute the average error value for each of the three approaches: (addition from model , addition of separate predictions for opinions from a model, ANDed prediction) """ # TEST AN INPUT AGAINST OUR MODEL # read packages and create a set of opinions for those packages """ else: print("Only debian vendors are supported for now.") sys.exit(1) __main__(action='status')