* fix: correctly give repo to rev dep db
This commit is contained in:
+4
-3
@@ -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,10 +118,11 @@ 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)
|
||||||
|
|
||||||
def remove_repo(self, repo, txn = None):
|
def remove_repo(self, repo, txn = None):
|
||||||
def proc(txn):
|
def proc(txn):
|
||||||
self.d.remove_repo(repo, txn=txn)
|
self.d.remove_repo(repo, txn=txn)
|
||||||
|
|||||||
Reference in New Issue
Block a user