* fix sourcedb tests

* fix: remove_spec was a wreck
This commit is contained in:
Eray Özkural
2006-04-09 18:42:45 +00:00
parent c9ca9c25aa
commit 9d62c590c7
+3 -3
View File
@@ -79,14 +79,14 @@ class SourceDB(object):
self.dpkgtosrc.add_item(pkg.name, name, repo, txn)
self.d.txn_proc(proc, txn)
def remove_specfile(self, name, repo, txn = None):
def remove_spec(self, name, repo, txn = None):
name = str(name)
def proc(txn):
assert self.has_spec(name, txn=txn)
spec = self.d.get_item_repo(name, repo, txn)
spec = self.d.get_item(name, repo, txn)
self.d.remove_item(name, txn=txn)
for pkg in spec.packages:
self.dpkgtosrc.remove_item_repo(pkg.name, name, repo, txn)
self.dpkgtosrc.remove_item_repo(pkg.name, repo, txn)
self.d.txn_proc(proc, txn)