[Piuparts-devel] Bug#648784: [PATCH 1/2] add the /etc/motd nested link testcase

Andreas Beckmann debian at abeckmann.de
Wed Nov 16 03:24:33 UTC 2011


/etc/motd -> /var/run/motd
/var/run -> /run
touch /run/motd

incorrectly reports broken symlinks in about 30000 packages

Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
---
 piuparts.py |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/piuparts.py b/piuparts.py
index bf8866f..5f015fe 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -568,6 +568,17 @@ class IsBrokenSymlinkTests(unittest.TestCase):
         self.failIf(is_broken_symlink(self.testdir, self.testdir,
                                       "target/first-link"))
 
+    def testMultiLevelNestedAbsoluteSymlinks(self):
+        # first-link -> /second-link/final-target
+        # second-link -> /target-dir
+
+        os.mkdir(os.path.join(self.testdir, "final-dir"))
+        os.mkdir(os.path.join(self.testdir, "final-dir/final-target"))
+        self.symlink("/second-link/final-target", "first-link")
+        self.symlink("/final-dir", "second-link")
+        self.failIf(is_broken_symlink(self.testdir, self.testdir,
+                                      "first-link"))
+
 
 class Chroot:
 
-- 
1.7.7.1






More information about the Piuparts-devel mailing list