Skip to content

[CMake] Always patch the builtins starting from the pristine sources - #24016

Merged
pcanal merged 1 commit into
root-project:masterfrom
guitargeek:fix-unuran-incremental-patch
Nov 6, 2026
Merged

pcanal merged 1 commit into
root-project:masterfrom
guitargeek:fix-unuran-incremental-patch

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 12h 43m 7s ⏱️
 3 884 tests  3 884 ✅ 0 💤 0 ❌
76 028 runs  76 028 ✅ 0 💤 0 ❌

Results for commit 3807741.

♻️ This comment has been updated with latest results.

@guitargeek
guitargeek force-pushed the fix-unuran-incremental-patch branch from 0ca3a70 to c7b8d99 Compare November 6, 2026 07:23

@bellenot bellenot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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
@guitargeek
guitargeek force-pushed the fix-unuran-incremental-patch branch from c7b8d99 to 3807741 Compare November 6, 2026 10:59

@pcanal pcanal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge as is since it seems to fix the issue in practice.

@pcanal
pcanal merged commit 5122f94 into root-project:master Nov 6, 2026
34 checks passed
@pcanal

pcanal commented Nov 6, 2026

Copy link
Copy Markdown
Member

/backport to v6.42

@guitargeek
guitargeek deleted the fix-unuran-incremental-patch branch November 6, 2026 22:58
@guitargeek

Copy link
Copy Markdown
Contributor Author

/backport to 6.42

@root-project-bot

Copy link
Copy Markdown

Preparing to backport PR #24016 to branch 6.42 requested by guitargeek

@root-project-bot

Copy link
Copy Markdown

Something went wrong with the creation of the PR to backport to 6.42: @guitargeek please see the logs

@guitargeek

Copy link
Copy Markdown
Contributor Author

/backport to 6.42

@root-project-bot

Copy link
Copy Markdown

Preparing to backport PR #24016 to branch 6.42 requested by guitargeek

@root-project-bot

Copy link
Copy Markdown

This PR has been backported to branch 6.42: #24046

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants