diff options
author | Daniele Nicolodi <daniele@grinta.net> | 2023-03-26 10:51:28 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2023-04-14 21:37:52 +0300 |
commit | 1bc3d91112c046006da26d1a5c77af4854c6899b (patch) | |
tree | ad1b5bf04825703cc338f1eba77249aa0770b65e /test cases/common | |
parent | 1c00cb2550517917a655fc6eb6471fc575a32ace (diff) | |
download | meson-1bc3d91112c046006da26d1a5c77af4854c6899b.zip meson-1bc3d91112c046006da26d1a5c77af4854c6899b.tar.gz meson-1bc3d91112c046006da26d1a5c77af4854c6899b.tar.bz2 |
minstall: Fix install_subdir() excludes with path separators on Win
The paths in meson.build use / as path separator, however, the paths
constructed during the directory structure walk use native path
separators, thus the path never compare equal to the excluded ones.
Normalize the exclusion paths before the comparison.
Diffstat (limited to 'test cases/common')
5 files changed, 10 insertions, 0 deletions
diff --git a/test cases/common/59 install subdir/meson.build b/test cases/common/59 install subdir/meson.build index 13d41be..fb2034b 100644 --- a/test cases/common/59 install subdir/meson.build +++ b/test cases/common/59 install subdir/meson.build @@ -7,6 +7,12 @@ install_subdir('sub2', exclude_directories : ['excluded'], install_dir : 'share') +# More exclusions +install_subdir('sub3', + exclude_files : ['data/excluded.txt'], + exclude_directories : ['data/excluded'], + install_dir : 'share') + subdir('subdir') # A subdir with write perms only for the owner # and read-list perms for owner and group diff --git a/test cases/common/59 install subdir/sub3/data/data.txt b/test cases/common/59 install subdir/sub3/data/data.txt new file mode 100644 index 0000000..1269488 --- /dev/null +++ b/test cases/common/59 install subdir/sub3/data/data.txt @@ -0,0 +1 @@ +data diff --git a/test cases/common/59 install subdir/sub3/data/excluded.txt b/test cases/common/59 install subdir/sub3/data/excluded.txt new file mode 100644 index 0000000..bbde3dc --- /dev/null +++ b/test cases/common/59 install subdir/sub3/data/excluded.txt @@ -0,0 +1 @@ +excluded diff --git a/test cases/common/59 install subdir/sub3/data/excluded/excluded.txt b/test cases/common/59 install subdir/sub3/data/excluded/excluded.txt new file mode 100644 index 0000000..bbde3dc --- /dev/null +++ b/test cases/common/59 install subdir/sub3/data/excluded/excluded.txt @@ -0,0 +1 @@ +excluded diff --git a/test cases/common/59 install subdir/test.json b/test cases/common/59 install subdir/test.json index 0dd885c..aa8e27a 100644 --- a/test cases/common/59 install subdir/test.json +++ b/test cases/common/59 install subdir/test.json @@ -12,6 +12,7 @@ {"type": "file", "file": "usr/share/sub1/sub2/data2.dat"}, {"type": "file", "file": "usr/share/sub2/one.dat"}, {"type": "file", "file": "usr/share/sub2/dircheck/excluded-three.dat"}, + {"type": "file", "file": "usr/share/sub3/data/data.txt"}, {"type": "dir", "file": "usr/share/new_directory"} ] } |