From 7889936347abe30e1948ec28bfe24b7d2a515b5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Sun, 7 May 2006 15:02:34 +0000 Subject: [PATCH] * fix: why is this needed :'( anybody knows? --- pisi/component.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pisi/component.py b/pisi/component.py index 13c42bae..493a86e6 100644 --- a/pisi/component.py +++ b/pisi/component.py @@ -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)