From 3000b6b473422dca3670c922c24d0e15e963281a Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 16 May 2011 11:08:32 -0500 Subject: pactest: treat symlinks with more respect Don't call os.stat() when we should be using os.lstat(); this allows us to actually test dead symlinks that don't have a corresponding file. Add a new LINK_EXIST rule that complements FILE_EXIST for a similar purpose. Signed-off-by: Dan McGee --- test/pacman/pmpkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/pacman/pmpkg.py') diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py index 73156ab2..be177f35 100755 --- a/test/pacman/pmpkg.py +++ b/test/pacman/pmpkg.py @@ -102,7 +102,7 @@ class pmpkg(object): # Generate package file system for f in self.files: util.mkfile(f, f) - self.size += os.stat(util.getfilename(f))[stat.ST_SIZE] + self.size += os.lstat(util.getfilename(f))[stat.ST_SIZE] # .PKGINFO data = ["pkgname = %s" % self.name] -- cgit v1.2.3