Seen on fontconfig package by Onur:

pisi was leaving symlinks in the system when removing a package.
This commit is contained in:
Faik Uygur
2008-09-25 08:12:22 +00:00
parent ad5afe94a1
commit bf5f52d4a1
+5 -1
View File
@@ -509,8 +509,12 @@ class Remove(AtomicOperation):
if fileinfo.type == ctx.const.conf:
# config files are precious, leave them as they are
# unless they are the same as provided by package.
# remove symlinks as they are, cause if the hash of the
# file it links has changed, it will be kept as is,
# and when the package is reinstalled the symlink will
# link to that changed file again.
try:
if pisi.util.sha1_file(fpath) == fileinfo.hash:
if os.path.islink(fpath) or pisi.util.sha1_file(fpath) == fileinfo.hash:
os.unlink(fpath)
else:
# keep changed file in history