shouldn't remove conflicted files...

This commit is contained in:
Barış Metin
2006-06-09 12:30:51 +00:00
parent 78aceffb46
commit 2f98b5c735
+9
View File
@@ -406,6 +406,15 @@ class Remove(AtomicOperation):
def remove_file(fileinfo):
fpath = pisi.util.join_path(ctx.config.dest_dir(), fileinfo.path)
# we should check if the file is also provided by another
# package (this is clearly the package's fault but we
# shouldn't left system in an inconsistent state).
if ctx.filesdb.has_file(fpath):
pkg, existing_file = ctx.filesdb.get_file(fpath)
if pkg != self.package_name:
ctx.ui.warning(_('Not removing conflicted file : %s') % fpath)
# TODO: We have to store configuration files for futher
# usage. Currently we'are doing it like rpm does, saving
# with a prefix and leaving the user to edit it. In the future