def insert_full_parse(self, section):
     c = self.current
     listfile = self.manager.listfile(c.name, c.type, section)
     if not isfile(listfile):
         raise NoFileError, 'file not there'
     table = fullparse_tablename(c.name, c.type, section)
     fptable = FullParseCursor(self.conn, table)
     for package, data in full_parse(listfile).items():
         fptable.set_package(package)
         fptable.update(data)
 def parse_section(self, name, type, section=None):
     listfile = self.listfile(name, type, section)
     debug(listfile)
     if not isfile(listfile):
         raise NoFileError, 'file not there'
     if type == 'deb':
         return full_parse(listfile)
     elif type == 'deb-src':
         return parse_sources(listfile)
     else:
         raise Error, 'bad source type'
示例#3
0
 def get_available(self):
     return full_parse(self._join('available'))
示例#4
0
 def get_status(self):
     return full_parse(self._join('status'))
示例#5
0
 def full_parse(self, section=None):
     listfile = self._listfile_(section)
     return full_parse(listfile)