* fix: why is this needed :'( anybody knows?

This commit is contained in:
Eray Özkural
2006-05-07 15:02:34 +00:00
parent 4a121f46fd
commit 7889936347
+5 -3
View File
@@ -16,6 +16,7 @@ __trans = gettext.translation('pisi', fallback=True)
_ = __trans.ugettext
import pisi
import pisi.context as ctx
import pisi.pxml.xmlfile as xmlfile
import pisi.pxml.autoxml as autoxml
import pisi.lockeddbshelve as shelve
@@ -155,8 +156,8 @@ class ComponentDB(object):
self.d.add_item(component_name, component, repo, txn) # update
self.d.txn_proc(proc, txn)
def remove_package(self, component_name, package, repo = None, txn = None):
def proc(txn):
def remove_package(self, component_name, package, repo, txn = None):
def proc(txn, repo):
if not self.has_component(component_name, repo, txn):
raise Error(_('Information for component %s not available') % component_name)
if not repo:
@@ -165,7 +166,8 @@ class ComponentDB(object):
if package in component.packages:
component.packages.remove(package)
self.d.add_item(component_name, component, repo, txn) # update
self.d.txn_proc(proc, txn)
ctx.txn_proc(lambda x: proc(txn, repo), txn)
def clear(self, txn = None):
self.d.clear(txn)