1 From d38612fe50395a35d6fdc0774d56c7c2ddc58cf7 Mon Sep 17 00:00:00 2001
2 From: Michael Tremer <michael.tremer@ipfire.org>
3 Date: Sun, 22 Apr 2012 14:48:10 +0200
4 Subject: [PATCH 8/8] Fixes for removing files (and configfiles).
6 There were some problems when the user removed those
9 python/pakfire/packages/base.py | 12 ++++++++++++
10 1 files changed, 12 insertions(+), 0 deletions(-)
12 diff --git a/python/pakfire/packages/base.py b/python/pakfire/packages/base.py
13 index e27c3f7..9162536 100644
14 --- a/python/pakfire/packages/base.py
15 +++ b/python/pakfire/packages/base.py
16 @@ -516,6 +516,12 @@ class Package(object):
18 # Rename configuration files.
20 + # Skip already removed config files.
26 file_save = "%s%s" % (file, CONFIG_FILE_SUFFIX_SAVE)
29 @@ -530,6 +536,7 @@ class Package(object):
31 # Handle regular files and symlinks.
32 if os.path.isfile(file) or os.path.islink(file):
33 + log.debug("Removing %s..." % _file)
37 @@ -545,6 +552,11 @@ class Package(object):
41 + # Handle files that have already been removed
43 + elif not os.path.exists(file):
46 # Log all unhandled types.
48 log.warning("Cannot remove file: %s. Filetype is unhandled." % file)