]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
Fix packaging of symlinks that point to a directory.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 18 Oct 2011 21:51:44 +0000 (23:51 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 18 Oct 2011 21:51:44 +0000 (23:51 +0200)
python/pakfire/packages/packager.py

index e48018eededa9b4f59a05facdc705750e87ac24c..818a438ef252181ce5f9cdd30e62345f5a6f759b 100644 (file)
@@ -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)