예제 #1
0
  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  = []
예제 #2
0
 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
예제 #3
0
  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 = []
예제 #4
0
  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
예제 #5
0
파일: ddtp_gatherer.py 프로젝트: hmit/udd
  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
예제 #6
0
  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
예제 #7
0
파일: popcon_gatherer.py 프로젝트: hmit/udd
  def __init__(self, connection, config, source):
    gatherer.__init__(self, connection, config, source)

    self.assert_my_config('path', 'table', 'packages-table', 'schema')
예제 #8
0
 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 = {}
예제 #9
0
 def __init__(self, connection, config, source):
     gatherer.__init__(self, connection, config, source)
     self.assert_my_config('path', 'table')
예제 #10
0
 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')
예제 #11
0
파일: ftpnew_gatherer.py 프로젝트: hmit/udd
 def __init__(self, connection, config, source):
   gatherer.__init__(self, connection, config, source)
   self.assert_my_config('path', 'table_sources', 'table_packages', 'ftpmasterURL', 'releases_ignore')
예제 #12
0
 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)
예제 #13
0
파일: sensor.py 프로젝트: mastergreg/os-lab
 def __init__(self,minor,stype):
     gatherer.__init__(self,"/dev/lunix%d-%s"%(minor,stype))
예제 #14
0
 def __init__(self, connection, config, source):
   gatherer.__init__(self, connection, config, source)
   self.assert_my_config('bugs-path', 'table', 'unarchived-table')
예제 #15
0
파일: hints_gatherer.py 프로젝트: hmit/udd
 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)
예제 #16
0
 def __init__(self, connection, config, source):
   gatherer.__init__(self, connection, config, source)