* fix: remove must look at installed db not the remote repository!

* fix: db code, make get_rev_deps and has_key work with repo args...
This commit is contained in:
Eray Özkural
2006-04-12 17:24:13 +00:00
parent 5ddeedcce1
commit bac16a5205
3 changed files with 7 additions and 6 deletions
+2 -1
View File
@@ -113,7 +113,8 @@ class ItemByRepoDB(object):
if not repo:
return haskey
else:
return haskey and self.d.get(name, txn).has_key(repo)
repostr = self.repo_str(repo)
return haskey and self.d.get(name, txn).has_key(repostr)
def get_item_repo(self, name, repo = None, txn = None):
name = str(name)
+2 -2
View File
@@ -493,8 +493,8 @@ def plan_remove(A):
while len(B) > 0:
Bp = set()
for x in B:
pkg = ctx.packagedb.get_package(x)
rev_deps = ctx.packagedb.get_rev_deps(x)
pkg = ctx.packagedb.get_package(x, pisi.itembyrepodb.installed)
rev_deps = ctx.packagedb.get_rev_deps(x, pisi.itembyrepodb.installed)
for (rev_dep, depinfo) in rev_deps:
# we don't deal with uninstalled rev deps
# and unsatisfied dependencies (this is important, too)
+3 -3
View File
@@ -73,9 +73,9 @@ class PackageDB(object):
def which_repo(self, name, txn = None):
return self.d.which_repo(name, txn=txn)
def get_rev_deps(self, name):
if self.dr.has_key(name):
return self.dr.get_item(name)
def get_rev_deps(self, name, repo = None, txn = None):
if self.dr.has_key(name, repo, txn=txn):
return self.dr.get_item(name, repo, txn=txn)
else:
return []