* fix: correctly give repo to rev dep db

This commit is contained in:
Eray Özkural
2006-05-10 14:26:27 +00:00
parent 9b3b62d2dc
commit 3102be97d1
+3 -2
View File
@@ -89,8 +89,8 @@ class PackageDB(object):
self.d.add_item(name, package_info, repo, txn) self.d.add_item(name, package_info, repo, txn)
for dep in package_info.runtimeDependencies(): for dep in package_info.runtimeDependencies():
dep_name = str(dep.package) dep_name = str(dep.package)
if self.dr.has_key(dep_name, None, txn): if self.dr.has_key(dep_name, repo, txn):
revdep = self.dr.get_item(dep_name, None, txn) revdep = self.dr.get_item(dep_name, repo, txn)
revdep = filter(lambda (n,d):n!=name, revdep) revdep = filter(lambda (n,d):n!=name, revdep)
revdep.append( (name, dep) ) revdep.append( (name, dep) )
self.dr.add_item(dep_name, revdep, repo, txn) self.dr.add_item(dep_name, revdep, repo, txn)
@@ -118,6 +118,7 @@ class PackageDB(object):
package_info = self.d.get_item(name, repo, txn=txn) package_info = self.d.get_item(name, repo, txn=txn)
self.d.remove_item(name, repo, txn=txn) self.d.remove_item(name, repo, txn=txn)
if self.dr.has_key(name, repo, txn=txn): if self.dr.has_key(name, repo, txn=txn):
self.dr.remove_item(name, repo, txn=txn) self.dr.remove_item(name, repo, txn=txn)
ctx.componentdb.remove_package(package_info.partOf, package_info.name, repo, txn) ctx.componentdb.remove_package(package_info.partOf, package_info.name, repo, txn)
self.d.txn_proc(proc, txn) self.d.txn_proc(proc, txn)