From 5bda6ee901f031a24d43c476f24c33770f588731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Fri, 22 Jul 2005 13:17:47 +0000 Subject: [PATCH] =?UTF-8?q?remove=20s=C4=B1ras=C4=B1na=20yap=C4=B1land?= =?UTF-8?q?=C4=B1rma=20dosyalar=C4=B1n=C4=B1=20silme.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/operations.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pisi/operations.py b/pisi/operations.py index b317c995..f7492079 100644 --- a/pisi/operations.py +++ b/pisi/operations.py @@ -19,7 +19,15 @@ def remove(package_name): raise Exception('Trying to remove nonexistent package ' + package_name) for fileinfo in installdb.files(package_name).list: - os.unlink( os.path.join(config.destdir, fileinfo.path) ) + fpath = os.path.join(config.destdir, fileinfo.path) + # TODO: We have to store configuration files for futher + # usage. Currently we'are doing it like rpm does and saving + # with a prefix, leaving the user to edit it. In the future + # we'll have a plan for these configuration files. + if fileinfo.type == const.conf: + os.rename(fpath, fpath+".pisi") + else: + os.unlink(fpath) installdb.remove(package_name) removeScripts(package_name)