From 26639c549eef0c1c7261339c0a2c4490bf15a99f Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 18 Oct 2011 23:51:44 +0200 Subject: [PATCH] Fix packaging of symlinks that point to a directory. --- python/pakfire/packages/packager.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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) -- 2.39.5