def __init__(self, config): self.config = config self.output = config['output'] self.path = config['installed'] self.output.debug("DB.__init__(): config['installed'] = %s" % self.path, 3) if config['nocheck']: ignore = 2 else: ignore = 1 DbBase.__init__(self, config, paths=[config['installed'], ], ignore=ignore, ) self.repo_conf = RepoConfManager(self.config, self.overlays) self.output.debug('DB handler initiated', 6) # check and handle the name change if not os.access(self.config['installed'], os.F_OK) and \ os.access(self.config['local_list'], os.F_OK): self.output.die("Please run layman-updater, " "then run layman again")
def __init__(self, config): self.config = config self.output = config['output'] self.path = config['installed'] self.output.debug( "DB.__init__(): config['installed'] = %s" % self.path, 3) if config['nocheck']: ignore = 2 else: ignore = 1 DbBase.__init__( self, config, paths=[ config['installed'], ], ignore=ignore, allow_missing=True, ) self.repo_conf = RepoConfManager(self.config, self.overlays) self.output.debug('DB handler initiated', 6) # check and handle the name change if not os.access(self.config['installed'], os.F_OK) and \ os.access(self.config['local_list'], os.F_OK): self.output.die("Please run layman-updater, " "then run layman again")
def __init__(self, config, ignore_init_read_errors=False): self.config = config self.output = config['output'] self.detached_urls = [] self.signed_urls = [] self.proxies = config.proxies self.urls = [ i.strip() for i in config['overlays'].split('\n') if len(i) ] if GPG_ENABLED: self.get_gpg_urls() else: self.output.debug( 'RemoteDB.__init__(), NOT GPG_ENABLED, ' 'bypassing...', 2) # add up the lists to load for display, etc. # unsigned overlay lists paths = [self.filepath(i) + '.xml' for i in self.urls] # detach-signed lists paths.extend( [self.filepath(i[0]) + '.xml' for i in self.detached_urls]) # single file signed, compressed, clearsigned paths.extend([self.filepath(i) + '.xml' for i in self.signed_urls]) self.output.debug( 'RemoteDB.__init__(), url lists= \nself.urls: ' '%s\nself.detached_urls: %s\nself.signed_urls: %s' % (str(self.urls), str(self.detached_urls), str(self.signed_urls)), 2) self.output.debug( 'RemoteDB.__init__(), paths to load = %s' % str(paths), 2) if config['nocheck']: ignore = 2 else: ignore = 0 #quiet = int(config['quietness']) < 3 DbBase.__init__(self, config, paths=paths, ignore=ignore, ignore_init_read_errors=ignore_init_read_errors) self.gpg = None self.gpg_config = None
def __init__(self, config, ignore_init_read_errors=False): self.config = config self.output = config['output'] self.detached_urls = [] self.signed_urls = [] self.proxies = config.proxies self.urls = [i.strip() for i in config['overlays'].split('\n') if len(i)] if GPG_ENABLED: self.get_gpg_urls() else: self.output.debug('RemoteDB.__init__(), NOT GPG_ENABLED, ' 'bypassing...', 2) # add up the lists to load for display, etc. # unsigned overlay lists paths = [self.filepath(i) + '.xml' for i in self.urls] # detach-signed lists paths.extend([self.filepath(i[0]) + '.xml' for i in self.detached_urls]) # single file signed, compressed, clearsigned paths.extend([self.filepath(i) + '.xml' for i in self.signed_urls]) self.output.debug('RemoteDB.__init__(), url lists= \nself.urls: ' '%s\nself.detached_urls: %s\nself.signed_urls: %s' % (str(self.urls), str(self.detached_urls), str(self.signed_urls)), 2) self.output.debug('RemoteDB.__init__(), paths to load = %s' %str(paths), 2) if config['nocheck']: ignore = 2 else: ignore = 0 #quiet = int(config['quietness']) < 3 DbBase.__init__(self, config, paths=paths, ignore=ignore, ignore_init_read_errors=ignore_init_read_errors) self.gpg = None self.gpg_config = None