summaryrefslogtreecommitdiffstats
path: root/test/pacman/pmpkg.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-05-16 18:08:32 +0200
committerDan McGee <dan@archlinux.org>2011-05-16 18:31:26 +0200
commit3000b6b473422dca3670c922c24d0e15e963281a (patch)
tree2310d5b9574d2f6906bbddb446179edbfbb54e68 /test/pacman/pmpkg.py
parentac6f6b317ae4bb7adf5ea08fbad6a75f024ff75a (diff)
downloadpacman-3000b6b473422dca3670c922c24d0e15e963281a.tar.gz
pacman-3000b6b473422dca3670c922c24d0e15e963281a.tar.xz
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 <dan@archlinux.org>
Diffstat (limited to 'test/pacman/pmpkg.py')
-rwxr-xr-xtest/pacman/pmpkg.py2
1 files changed, 1 insertions, 1 deletions
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]