waf: Make samba "ok" with directories for install being symlinks
authorIra Cooper <ira@samba.org>
Thu, 20 Sep 2012 19:38:12 +0000 (19:38 +0000)
committerIra Cooper <ira@samba.org>
Thu, 20 Sep 2012 21:26:26 +0000 (23:26 +0200)
stat -> lstat conversion.  This allows people for whom $PREFIX/var is a
symlink to complete make install.

Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Thu Sep 20 23:26:26 CEST 2012 on sn-devel-104

buildtools/wafadmin/Utils.py

index 41dad570ebe14551d734bc1935072a59549d1c60..91ded93b6e7d0ef194b2166e3d773b3f9fe7e8e5 100644 (file)
@@ -15,7 +15,7 @@ Utilities, the stable ones are the following:
 
        import stat
        def h_file(filename):
-               st = os.stat(filename)
+               st = os.lstat(filename)
                if stat.S_ISDIR(st[stat.ST_MODE]): raise IOError('not a file')
                m = Utils.md5()
                m.update(str(st.st_mtime))
@@ -419,7 +419,7 @@ def pprint(col, str, label='', sep='\n'):
 def check_dir(dir):
        """If a folder doesn't exists, create it."""
        try:
-               os.stat(dir)
+               os.lstat(dir)
        except OSError:
                try:
                        os.makedirs(dir)