summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@google.com>2018-04-25 00:25:51 -0700
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-06-02 04:50:32 +0000
commit0ccc0e92d114a281ba99fd668f36e69670a0af68 (patch)
tree9011de83f192b27aee091c53cbbe945e1c34ee20
parent6bab3d40a9b473ee3cfff0b3cc8207cebdeb00ce (diff)
downloadmeson-0ccc0e92d114a281ba99fd668f36e69670a0af68.tar.gz
Check mode of file, not subdirectory, in install_subdir.
When using an install_mode in install_subdir(), that should apply to the files and not to the directory tree. Otherwise, an install_mode not including the executable bit will make the tree inaccessible, since directories need it to be traversed. If the mode needs to be applied to both files and directories, then install_subdir() is only useful to install files with the executable bit set, which is not really that useful... So default to just using the umask for the directories and applying install_mode to the files only. This can be reviewed in the future, possibly by adding a separate install_dir_mode attribute, or perhaps adding an optional fourth field to FileMode with the mode for directories (this is similar to how RPM handles specifying mode of directory trees recursively added to the package.)
-rwxr-xr-xrun_unittests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/run_unittests.py b/run_unittests.py
index ec10833b4..061e40e10 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -2778,7 +2778,7 @@ class LinuxlikeTests(BasePlatformTests):
self.init(testdir)
self.install()
- f = os.path.join(self.installdir, 'usr', 'share', 'sub1')
+ f = os.path.join(self.installdir, 'usr', 'share', 'sub1', 'second.dat')
statf = os.stat(f)
found_mode = stat.filemode(statf.st_mode)
want_mode = 'rwxr-x--t'