diff options
| author | Xavier Claessens <xavier.claessens@collabora.com> | 2023-09-04 08:49:39 -0400 |
|---|---|---|
| committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2023-09-05 09:05:24 +0530 |
| commit | fe9af72684f85d709ce45096534aa51854a6da9b (patch) | |
| tree | 0b41f1df5e985a9943bc7f3d321f47786a7e9291 /docs | |
| parent | f07476a89677f5c87a62b6756b76a0e8ebc4bceb (diff) | |
| download | meson-fe9af72684f85d709ce45096534aa51854a6da9b.tar.gz | |
wrap: Use MESON_PACKAGE_CACHE_DIR as default packagecache path
Allow packagecache to contain already extracted directory to match what
some distro does with Cargo source packages in /usr/share/cargo/registry.
Note that there is no need to lock the cache directory because we
download into a temporary name and atomically rename afterward. It means
we could be downloading the same file twice, but at least integrity is
guaranteed.
Fixes: #12211
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/markdown/Wrap-dependency-system-manual.md | 6 | ||||
| -rw-r--r-- | docs/markdown/snippets/meson_home.md | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/docs/markdown/Wrap-dependency-system-manual.md b/docs/markdown/Wrap-dependency-system-manual.md index c8b91d53e..3aeea144a 100644 --- a/docs/markdown/Wrap-dependency-system-manual.md +++ b/docs/markdown/Wrap-dependency-system-manual.md @@ -109,6 +109,12 @@ project's `subprojects/packagecache` directory, it will be used instead of downloading the file, even if `--wrap-mode` option is set to `nodownload`. The file's hash will be checked. +Since *1.3.0* if the `MESON_PACKAGE_CACHE_DIR` environment variable is set, it is used instead of +the project's `subprojects/packagecache`. This allows sharing the cache across multiple +projects. In addition it can contain an already extracted source tree as long as it +has the same directory name as the `directory` field in the wrap file. In that +case, the directory will be copied into `subprojects/` before applying patches. + ### Specific to VCS-based wraps - `url` - name of the wrap-git repository to clone. Required. - `revision` - name of the revision to checkout. Must be either: a diff --git a/docs/markdown/snippets/meson_home.md b/docs/markdown/snippets/meson_home.md new file mode 100644 index 000000000..2d656fc1e --- /dev/null +++ b/docs/markdown/snippets/meson_home.md @@ -0,0 +1,7 @@ +## New environment variable `MESON_PACKAGE_CACHE_DIR` + +If the `MESON_PACKAGE_CACHE_DIR` environment variable is set, it is used instead of the +project's `subprojects/packagecache`. This allows sharing the cache across multiple +projects. In addition it can contain an already extracted source tree as long as it +has the same directory name as the `directory` field in the wrap file. In that +case, the directory will be copied into `subprojects/` before applying patches. |
