* keep generate_xyz_order api name consistency
* give pending_list to generate_pending_order as the list to order. this avoids calling installdb.list_pending twice in configure_pending path. That call, reads the entire installdb and puts it on a dict var. so this also would decrease the memory usage.
This commit is contained in:
+2
-3
@@ -234,9 +234,8 @@ def generate_conflicts(A):
|
||||
(C, D, E) = calculate_conflicts(A, ctx.packagedb)
|
||||
return (C, D, E)
|
||||
|
||||
def generate_pending_list():
|
||||
def generate_pending_order(A):
|
||||
# returns pending package list in reverse topological order of dependency
|
||||
A = ctx.installdb.list_pending()
|
||||
G_f = pgraph.PGraph(ctx.packagedb, pisi.itembyrepodb.installed) # construct G_f
|
||||
for x in A.keys():
|
||||
G_f.add_package(x)
|
||||
@@ -264,7 +263,7 @@ def configure_pending():
|
||||
# start with pending packages
|
||||
# configure them in reverse topological order of dependency
|
||||
A = ctx.installdb.list_pending()
|
||||
order = generate_pending_list()
|
||||
order = generate_pending_order(A)
|
||||
try:
|
||||
import pisi.comariface as comariface
|
||||
for x in order:
|
||||
|
||||
@@ -1472,7 +1472,8 @@ Lists packages waiting to be configured.
|
||||
def run(self):
|
||||
self.init(database = True, write = False)
|
||||
|
||||
order = api.generate_pending_list()
|
||||
A = ctx.installdb.list_pending()
|
||||
order = api.generate_pending_order(A)
|
||||
|
||||
if len(order):
|
||||
for p in order:
|
||||
|
||||
Reference in New Issue
Block a user