From: Michael Tremer Date: Tue, 18 Oct 2011 21:51:44 +0000 (+0200) Subject: Fix packaging of symlinks that point to a directory. X-Git-Tag: 0.9.17~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26639c549eef0c1c7261339c0a2c4490bf15a99f;p=pakfire.git Fix packaging of symlinks that point to a directory. --- diff --git a/python/pakfire/packages/packager.py b/python/pakfire/packages/packager.py index e48018eed..818a438ef 100644 --- a/python/pakfire/packages/packager.py +++ b/python/pakfire/packages/packager.py @@ -286,8 +286,9 @@ class BinaryPackager(Packager): if not os.path.exists(pattern): continue - # Add directories recursively... - if os.path.isdir(pattern): + # Add directories recursively but skip those symlinks + # that point to a directory. + if os.path.isdir(pattern) and not os.path.islink(pattern): # Add directory itself. files.append(pattern) @@ -303,7 +304,7 @@ class BinaryPackager(Packager): file = os.path.join(dir, file) files.append(file) - # all other files are just added. + # All other files are just added. else: files.append(pattern)