better way to fix this. (eray)
This commit is contained in:
@@ -352,7 +352,7 @@ class Remove(AtomicOperation):
|
|||||||
def __init__(self, package_name, ignore_dep = None):
|
def __init__(self, package_name, ignore_dep = None):
|
||||||
super(Remove, self).__init__(ignore_dep)
|
super(Remove, self).__init__(ignore_dep)
|
||||||
self.package_name = package_name
|
self.package_name = package_name
|
||||||
self.package = ctx.packagedb.get_package(self.package_name)
|
self.package = ctx.packagedb.get_package(self.package_name, pisi.itembyrepodb.installed)
|
||||||
try:
|
try:
|
||||||
self.files = ctx.installdb.files(self.package_name)
|
self.files = ctx.installdb.files(self.package_name)
|
||||||
except pisi.Error, e:
|
except pisi.Error, e:
|
||||||
@@ -434,10 +434,8 @@ class Remove(AtomicOperation):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def remove_pisi_files(self):
|
def remove_pisi_files(self):
|
||||||
(iversion, irelease, ibuild) = ctx.installdb.get_version(self.package_name)
|
util.clean_dir(self.package.pkg_dir())
|
||||||
path = ctx.installdb.pkg_dir(self.package_name, iversion, irelease)
|
|
||||||
util.clean_dir(path)
|
|
||||||
|
|
||||||
def remove_db(self, txn):
|
def remove_db(self, txn):
|
||||||
ctx.installdb.remove(self.package_name, txn)
|
ctx.installdb.remove(self.package_name, txn)
|
||||||
ctx.filesdb.remove_files(self.files, txn)
|
ctx.filesdb.remove_files(self.files, txn)
|
||||||
|
|||||||
Reference in New Issue
Block a user