def get_repo(self, name): repo = self.db.get("SELECT id FROM repositories WHERE distro_id = %s AND name = %s", self.id, name) if not repo: return repo = Repository(self.pakfire, repo.id) repo._distro = self return repo
def repositories(self): _repos = self.db.query("SELECT id FROM repositories WHERE distro_id = %s", self.id) repos = [] for repo in _repos: repo = Repository(self.pakfire, repo.id) repo._distro = self repos.append(repo) return sorted(repos)