Show More
@@ -85,6 +85,22 b' def has_svn_bindings():' | |||||
85 | def has_symlink(): |
|
85 | def has_symlink(): | |
86 | return hasattr(os, "symlink") |
|
86 | return hasattr(os, "symlink") | |
87 |
|
87 | |||
|
88 | def has_unix_permissions(): | |||
|
89 | d = tempfile.mkdtemp(prefix=tempprefix, dir=".") | |||
|
90 | try: | |||
|
91 | fname = os.path.join(d, 'foo') | |||
|
92 | for umask in (077, 007, 022): | |||
|
93 | os.umask(umask) | |||
|
94 | f = open(fname, 'w') | |||
|
95 | f.close() | |||
|
96 | mode = os.stat(fname).st_mode | |||
|
97 | os.unlink(fname) | |||
|
98 | if mode & 0777 != ~umask & 0666: | |||
|
99 | return False | |||
|
100 | return True | |||
|
101 | finally: | |||
|
102 | os.rmdir(d) | |||
|
103 | ||||
88 | checks = { |
|
104 | checks = { | |
89 | "cvs": (has_cvs, "cvs client"), |
|
105 | "cvs": (has_cvs, "cvs client"), | |
90 | "cvsps": (has_cvsps, "cvsps utility"), |
|
106 | "cvsps": (has_cvsps, "cvsps utility"), | |
@@ -98,6 +114,7 b' checks = {' | |||||
98 | "svn": (has_svn, "subversion client and admin tools"), |
|
114 | "svn": (has_svn, "subversion client and admin tools"), | |
99 | "svn-bindings": (has_svn_bindings, "subversion python bindings"), |
|
115 | "svn-bindings": (has_svn_bindings, "subversion python bindings"), | |
100 | "symlink": (has_symlink, "symbolic links"), |
|
116 | "symlink": (has_symlink, "symbolic links"), | |
|
117 | "unix-permissions": (has_unix_permissions, "unix-style permissions"), | |||
101 | } |
|
118 | } | |
102 |
|
119 | |||
103 | def list_features(): |
|
120 | def list_features(): |
General Comments 0
You need to be logged in to leave comments.
Login now