Fetch only#1792
Conversation
924e994 to
7e8788d
Compare
danyeaw
left a comment
There was a problem hiding this comment.
Hi @Ytsejam76, thanks for the contribution.
Could you please explain what the use case of this feature is and what motivated you to implement it?
Could you please also update the README to explain the feature and how it is supposed to work as docs for the change?
fee6f82 to
c08a83c
Compare
I added some paragraphs in the README. |
danyeaw
left a comment
There was a problem hiding this comment.
Hey @Ytsejam76, this is looking really good. Just a couple of suggestions.
d102320 to
e8fba6b
Compare
|
I added those. I wonder whether a squash would look better but I leave it as it is. |
7a945e5 to
8be5f5a
Compare
--fetch-only downloads and hash-checks source archives without building. It does not require the build toolchain (msys2, Visual Studio) so it can run on any platform, e.g. to populate a source mirror. --offline builds using only pre-downloaded sources (no network). Git-based projects are archived into <archives-download-dir>/git/<name>-<commit>.git.zip and restored without network access. A missing source aborts the build. Also makes script_title() a no-op off Windows where ctypes.windll is absent.
This PR adds support for downloading all required sources separately from the build and then building without network access.
It introduces:
--fetch-onlyis the cache/mirror population mode. It can run on Linux or any other host, and its job is to download the sources and create the git mirror archives.--offlineis still a build mode. It avoids network access by reusing the already downloaded sources and mirror archives, but it keeps the normal build-environment requirements on Windows.Example:
The source directory can then be copied to the build machine:
Git-based projects are stored as archives containing the complete repository, including submodules and revision information, so they can be restored without contacting the remote server.
The download command also skips Windows-specific build-tool checks, making it possible to prepare the source cache on another platform.