From: Michael Tremer Date: Sun, 17 Jul 2011 17:58:17 +0000 (+0200) Subject: Fix grouplist command. X-Git-Tag: 0.9.3~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fec9a917b213d2ec7b2bac030db043b485229d8a;p=people%2Fms%2Fpakfire.git Fix grouplist command. --- diff --git a/pakfire/base.py b/pakfire/base.py index d42d7232b..8ffbd7958 100644 --- a/pakfire/base.py +++ b/pakfire/base.py @@ -249,12 +249,15 @@ class Pakfire(object): self.install(pkgs) def grouplist(self, group): - pkgs = self.repos.get_by_group(group) + pkgs = [] - pkgs = packages.PackageListing(pkgs) - pkgs.unique() + for solv in self.pool.search(group, satsolver.SEARCH_SUBSTRING, "solvable:group"): + pkg = packages.SolvPackage(self, solv) + + if group in pkg.groups and not pkg.name in pkgs: + pkgs.append(pkg.name) - return [p.name for p in pkgs] + return sorted(pkgs) @staticmethod def build(pkg, resultdirs=None, shell=False, **kwargs):