Repository navigation
[CMake] Always patch the builtins starting from the pristine sources - #24016
guitargeek wants to merge 1 commit into
Conversation
Test Results 22 files 22 suites 3d 12h 58m 45s ⏱️ For more details on these failures, see this check. Results for commit 0ca3a70. |
0ca3a70 to
c7b8d99
Compare
| # Undo those that are there, in reverse order. If this doesn't result in the | ||
| # pristine sources, applying the patches below fails, and the sources are | ||
| # downloaded again. |
There was a problem hiding this comment.
I fail to see where the re-download is triggered, what am I missing?
There was a problem hiding this comment.
You're right, the wording is not clear here. The re-download is only triggered in the next build by the removed download stamp file (see logic around line 105). I'll change the comment here to say "downloaded again in the next build" as well.
Note that deferring the re-download to the next build was much easier than trying ExternalProject_Add to re-download. That's why I went with the easy solution with a clear error message.
ExternalProject re-runs the patch step not only after a new download, but also when the patch command changes, and then on the already patched tree. Since 0db7792 changed the unuran patch command, this breaks the incremental opensuse CI build. The configure-time checks of the other builtins with patches fail the other way around: after a new download, they skip the patches. Add ROOT_BUILTIN_PATCH_COMMAND, whose patch step commits the pristine sources to a git repository in the source directory and resets to them before applying the patches, so it can always run. Trees patched by the old commands are handled by undoing their patches first, or, if that fails, by downloading the sources again. Use it for all builtins with patches. 🤖 Done with the help of AI
c7b8d99 to
3807741
Compare
ExternalProject re-runs the patch step not only after a new download, but also when the patch command changes, and then on the already patched tree. Since 0db7792 changed the unuran patch command, this breaks the incremental opensuse CI build. The configure-time checks of the other builtins with patches fail the other way around: after a new download, they skip the patches.
Add ROOT_BUILTIN_PATCH_COMMAND, whose patch step commits the pristine sources to a git repository in the source directory and resets to them before applying the patches, so it can always run. Trees patched by the old commands are handled by undoing their patches first, or, if that fails, by downloading the sources again. Use it for all builtins with patches.
🤖 Done with the help of AI