canutils/lely-canopen: avoid patch reapply on repeated builds.#3447
Merged
raiden00pl merged 1 commit intoapache:masterfrom Apr 3, 2026
Merged
canutils/lely-canopen: avoid patch reapply on repeated builds.#3447raiden00pl merged 1 commit intoapache:masterfrom
raiden00pl merged 1 commit intoapache:masterfrom
Conversation
The patch step currently uses a phony target, so it is executed again when the build is repeated in the same source tree. In that case `patch -N` detects previously applied patches and returns 1, which make treats as a failure. Replace the phony patch target with a stamped `.patched` file so the patch step is not re-run unnecessarily. Fixes apache#3188 Signed-off-by: Shunchao Hu <ankohuu@gmail.com>
raiden00pl
approved these changes
Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The patch step in
canutils/lely-canopencurrently uses a phony target, so itis re-executed when the build is repeated in the same source tree.
When that happens,
patch -Ndetects that the patches were already applied andreturns 1. Although this is treated as a non-fatal condition by
patch,maketreats it as an error and aborts the build.Replace the phony patch target with a stamped
.patchedfile so the patch stepis not re-run unnecessarily on subsequent builds.
Fixes #3188
Impact
canutils/lely-canopenthird-partylely-coremake process.Testing
I confirm that changes are verified on local setup and works as intended:
Configuration used:
Command:
Before the patch, re-running the patch step failed:
Test logs after the patch:
Full build logs: