From dcb5bc821c68d083300cc7c13beff8567c24b253 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 1 Oct 2011 14:49:17 +0200 Subject: [PATCH] Fix packaging of unresolvable symlinks. --- python/pakfire/packages/packager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/pakfire/packages/packager.py b/python/pakfire/packages/packager.py index 16ed55fe8..4e913cbd2 100644 --- a/python/pakfire/packages/packager.py +++ b/python/pakfire/packages/packager.py @@ -351,9 +351,6 @@ class BinaryPackager(Packager): # Remove all packaged files. for file in reversed(files): - if not os.path.exists(file): - continue - # It's okay if we cannot remove directories, # when they are not empty. if os.path.isdir(file): @@ -362,7 +359,10 @@ class BinaryPackager(Packager): except OSError: continue else: - os.unlink(file) + try: + os.unlink(file) + except OSError: + pass while True: file = os.path.dirname(file) -- 2.39.5