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'
def full_parse(self, section=None): listfile = self._listfile_(section) return full_parse(listfile)
def get_available(self): return full_parse(self._join('available'))
def get_status(self): return full_parse(self._join('status'))