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: #12211pull/11946/merge
parent
f07476a896
commit
fe9af72684
9 changed files with 48 additions and 2 deletions
@ -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. |
@ -0,0 +1 @@ |
||||
project('bar') |
Binary file not shown.
@ -0,0 +1,4 @@ |
||||
project('meson package cache dir') |
||||
|
||||
subproject('foo') |
||||
subproject('bar') |
@ -0,0 +1,3 @@ |
||||
[wrap-file] |
||||
directory = bar |
||||
|
@ -0,0 +1,5 @@ |
||||
[wrap-file] |
||||
directory = foo |
||||
source_url = http://server.invalid/foo.zip |
||||
source_filename = foo.zip |
||||
source_hash = c5dd7e8fca93045f736c83700686722b0fbc20b7dc4597b295060684c5b05b72 |
Loading…
Reference in new issue