From ec087edd408a69819d33715188640e2b8cf646fa Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Wed, 29 Nov 2006 18:06:44 +0000 Subject: [PATCH] * argh! sym links... --- pisi/build.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pisi/build.py b/pisi/build.py index 4f778ead..49e0a5ed 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -613,7 +613,10 @@ class Builder: frpath = util.removepathprefix(install_dir, fpath) # relative path ftype, permanent = get_file_type(frpath, package.files, install_dir) fsize = util.dir_size(fpath) - st = os.stat(fpath) + if not os.path.islink(fpath): + st = os.stat(fpath) + else: + st = os.lstat(fpath) d[frpath] = FileInfo(path=frpath, type=ftype, permanent=permanent, size=fsize, hash=fhash, uid=str(st.st_uid), gid=str(st.st_gid), mode=oct(S_IMODE(st.st_mode)))