diff --git a/pisi/api.py b/pisi/api.py index 26b21e24..6c287f36 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -234,9 +234,7 @@ def generate_conflicts(A): (C, D, E) = calculate_conflicts(A, ctx.packagedb) return (C, D, E) -def configure_pending(): - # start with pending packages - # configure them in reverse topological order of dependency +def generate_pending_list(): A = ctx.installdb.list_pending() G_f = pgraph.PGraph(ctx.packagedb, pisi.itembyrepodb.installed) # construct G_f for x in A.keys(): @@ -259,6 +257,12 @@ def configure_pending(): if ctx.componentdb.has_component('system.base'): order = reorder_base_packages(order) + return order + +def configure_pending(): + # start with pending packages + # configure them in reverse topological order of dependency + order = generate_pending_list() try: import pisi.comariface as comariface for x in order: diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index 0ca76dec..299bef93 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -1472,9 +1472,10 @@ Lists packages waiting to be configured. def run(self): self.init(database = True, write = False) - list = ctx.installdb.list_pending() - if len(list.keys()): - for p in list.keys(): + order = api.generate_pending_list() + + if len(order): + for p in order: print p else: ctx.ui.info(_('There are no packages waiting to be configured'))