Seen on fontconfig package by Onur:
pisi was leaving symlinks in the system when removing a package.
This commit is contained in:
@@ -509,8 +509,12 @@ class Remove(AtomicOperation):
|
|||||||
if fileinfo.type == ctx.const.conf:
|
if fileinfo.type == ctx.const.conf:
|
||||||
# config files are precious, leave them as they are
|
# config files are precious, leave them as they are
|
||||||
# unless they are the same as provided by package.
|
# 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:
|
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)
|
os.unlink(fpath)
|
||||||
else:
|
else:
|
||||||
# keep changed file in history
|
# keep changed file in history
|
||||||
|
|||||||
Reference in New Issue
Block a user