diff options
| author | Daniele Nicolodi <daniele@grinta.net> | 2023-06-26 16:24:53 +0200 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-07-26 13:30:49 -0400 |
| commit | 9eb7fe332f6a6a8babd040b76ad2a6808faf0423 (patch) | |
| tree | c52b1c241f7f77e2e2beee8281c50ec39e32c569 /test cases | |
| parent | a0f165b2fa57653a44c97398c00c453ec28e6dcc (diff) | |
| download | meson-9eb7fe332f6a6a8babd040b76ad2a6808faf0423.tar.gz | |
Fix install_data() default install path
This fixes two issues in constructing the default installation path
when install_dir is not specified:
- inside a subproject, install_data() would construct the destination
path using the parent project name instead than the current project
name,
- when specifying preserve_path, install_data() would construct the
destination path omitting the project name.
Fixes #11910.
Diffstat (limited to 'test cases')
| -rw-r--r-- | test cases/common/12 data/meson.build | 4 | ||||
| -rw-r--r-- | test cases/common/12 data/subdir/data.txt | 0 | ||||
| -rw-r--r-- | test cases/common/12 data/subprojects/moredata/data.txt | 1 | ||||
| -rw-r--r-- | test cases/common/12 data/subprojects/moredata/meson.build | 3 | ||||
| -rw-r--r-- | test cases/common/12 data/test.json | 4 |
5 files changed, 11 insertions, 1 deletions
diff --git a/test cases/common/12 data/meson.build b/test cases/common/12 data/meson.build index d318633b3..aa0213178 100644 --- a/test cases/common/12 data/meson.build +++ b/test cases/common/12 data/meson.build @@ -22,3 +22,7 @@ install_data(sources : ['vanishing/to_be_renamed_2.txt', 'to_be_renamed_3.txt'], install_dir : 'share/renamed', rename : ['renamed 2.txt', 'renamed 3.txt']) install_data(sources : 'to_be_renamed_4.txt', rename : 'some/nested/path.txt') + +install_data('subdir/data.txt', preserve_path : true) + +subproject('moredata') diff --git a/test cases/common/12 data/subdir/data.txt b/test cases/common/12 data/subdir/data.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/common/12 data/subdir/data.txt diff --git a/test cases/common/12 data/subprojects/moredata/data.txt b/test cases/common/12 data/subprojects/moredata/data.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test cases/common/12 data/subprojects/moredata/data.txt @@ -0,0 +1 @@ + diff --git a/test cases/common/12 data/subprojects/moredata/meson.build b/test cases/common/12 data/subprojects/moredata/meson.build new file mode 100644 index 000000000..6234e261c --- /dev/null +++ b/test cases/common/12 data/subprojects/moredata/meson.build @@ -0,0 +1,3 @@ +project('moredata') + +install_data('data.txt') diff --git a/test cases/common/12 data/test.json b/test cases/common/12 data/test.json index f392e9a03..c5fef010c 100644 --- a/test cases/common/12 data/test.json +++ b/test cases/common/12 data/test.json @@ -10,6 +10,8 @@ {"type": "file", "file": "usr/share/renamed/renamed 2.txt"}, {"type": "file", "file": "usr/share/renamed/renamed 3.txt"}, {"type": "file", "file": "etc/etcfile.dat"}, - {"type": "file", "file": "usr/bin/runscript.sh"} + {"type": "file", "file": "usr/bin/runscript.sh"}, + {"type": "file", "file": "usr/share/moredata/data.txt"}, + {"type": "file", "file": "usr/share/data install test/subdir/data.txt"} ] } |
