def __init__(self, connection, config, source): gatherer.__init__(self, connection, config, source) self.assert_my_config('table-metadata') self.assert_my_config('table-tasks') self.assert_my_config('table-dependencies') self.meta = {} self.tasks = [] self.deps = []
def __init__(self, connection, config, source): gatherer.__init__(self, connection, config, source) # The ID for the distribution we want to include self._distr = None self.assert_my_config('directory', 'archs', 'release', 'components', 'distribution', 'packages-table', 'packages-schema') self.warned_about = {} # A mapping from <package-name><version> to 1 If <package-name><version> is # included in this dictionary, this means, that we've already added this # package with this version for architecture 'all' to the database. Needed # because different architectures include packages for architecture 'all' # with the same version, and we don't want these duplicate entries self.imported_all_pkgs = {} self.add_descriptions = False
def __init__(self, connection, config, source): gatherer.__init__(self, connection, config, source) self.assert_my_config('table') self.log = logging.getLogger(self.__class__.__name__) if debug==1: self.log.setLevel(logging.DEBUG) else: self.log.setLevel(logging.INFO) handler = logging.handlers.RotatingFileHandler(filename=self.__class__.__name__+'.log',mode='w') formatter = logging.Formatter("%(asctime)s - %(levelname)s - (%(lineno)d): %(message)s") handler.setFormatter(formatter) self.log.addHandler(handler) self.prospective = []
def __init__(self, connection, config, source): gatherer.__init__(self, connection, config, source) self.assert_my_config('table') my_config = self.my_config cur = self.cursor() query = "DELETE FROM %s" % my_config['table'] cur.execute(query) query = """PREPARE screenshots_insert (text, text, text, text, text, text, text, text, text, text) AS INSERT INTO %s (package, version, homepage, maintainer_name, maintainer_email, description, section, screenshot_url, large_image_url, small_image_url) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)""" % (my_config['table']) cur.execute(query) pkg = None
def __init__(self, connection, config, source): gatherer.__init__(self, connection, config, source) # The ID for the distribution we want to include self._distr = None self.assert_my_config('path', 'files', 'mirrorpath', 'descriptions-table', 'imports-table') self.log = logging.getLogger(self.__class__.__name__) if debug==1: self.log.setLevel(logging.DEBUG) else: self.log.setLevel(logging.INFO) handler = logging.handlers.RotatingFileHandler(filename=self.__class__.__name__+'.log',mode='w') formatter = logging.Formatter("%(asctime)s - %(levelname)s - (%(lineno)d): %(message)s") handler.setFormatter(formatter) self.log.addHandler(handler) cur = self.cursor() pkg = None
def __init__(self, connection, config, source): gatherer.__init__(self, connection, config, source) self.assert_my_config('path', 'files', 'table_apps', 'table_debconf') my_config = self.my_config cur = self.cursor() # create prepared statements here! query = """PREPARE %s_insert (text, text, text, text, text, text, text, text, text, int, int, int) AS INSERT INTO %s (package, version, release, maintainer, po_file, language, pkg_version_lang, last_translator, language_team, translated, fuzzy, untranslated) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)""" cur.execute(query % (my_config['table_apps'], my_config['table_apps'])) cur.execute(query % (my_config['table_debconf'], my_config['table_debconf'])) pkg = None
def __init__(self, connection, config, source): gatherer.__init__(self, connection, config, source) self.assert_my_config('path', 'table', 'packages-table', 'schema')
def __init__(self, connection, config, source): gatherer.__init__(self, connection, config, source) self._distr = None self.assert_my_config('directory', 'components', 'distribution', 'release', 'sources-table', 'sources-schema') self.warned_about = {}
def __init__(self, connection, config, source): gatherer.__init__(self, connection, config, source) self.assert_my_config('path', 'table')
def __init__(self, connection, config, source): gatherer.__init__(self, connection, config, source) self.assert_my_config('path', 'emails-table', 'names-table', 'keys-table', 'login-table')
def __init__(self, connection, config, source): gatherer.__init__(self, connection, config, source) self.assert_my_config('path', 'table_sources', 'table_packages', 'ftpmasterURL', 'releases_ignore')
def __init__(self, connection, config, source): self.is_ubuntu = source == 'ubuntu-upload-history' self.is_debian = not self.is_ubuntu gatherer.__init__(self, connection, config, source) if not 'path' in self.my_config: raise aux.ConfigException('path not specified for source ' + source)
def __init__(self,minor,stype): gatherer.__init__(self,"/dev/lunix%d-%s"%(minor,stype))
def __init__(self, connection, config, source): gatherer.__init__(self, connection, config, source) self.assert_my_config('bugs-path', 'table', 'unarchived-table')
def __init__(self, connection, config, source): gatherer.__init__(self, connection, config, source) if not 'path' in self.my_config: raise aux.ConfigException('path not specified for source ' + source)
def __init__(self, connection, config, source): gatherer.__init__(self, connection, config, source)