From: Michael Tremer Date: Sat, 1 Oct 2011 12:49:17 +0000 (+0200) Subject: Fix packaging of unresolvable symlinks. X-Git-Tag: 0.9.10~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcb5bc821c68d083300cc7c13beff8567c24b253;p=pakfire.git Fix packaging of unresolvable symlinks. --- 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)