Repository navigation
debian: use $(CURDIR) in help2man PATH to fix intermittent build failure - #1722
Merged
Merged
Conversation
override_dh_installman-arch used a relative path to locate the staged
pgloader binary:
PATH=debian/pgloader/usr/bin:$(PATH)
dpkg-buildpackage can shift the working directory during dh sequence
execution, causing the relative path to resolve to nothing. help2man
then cannot exec pgloader and exits 127, failing the build. The same
failure was observed on push-event runs while PR-event runs on different
runners passed, confirming it is runner/CWD-state-dependent.
Fix: use $(CURDIR) so the path is always absolute, matching the pattern
already used on the line above for override_dh_auto_test:
PATH=$(CURDIR)/build/bin:$(PATH)
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.
Problem
override_dh_installman-archlocates the staged pgloader binary via a relative PATH:dpkg-buildpackagecan shift the working directory during dh sequence execution. When that happens,debian/pgloader/usr/binresolves to nothing,help2mancannot execpgloader --help, and exits 127:This is intermittent because push-event and PR-event jobs land on different GitHub-hosted runners with different working-directory state — one run passes while the other fails on the same commit.
Fix
Replace the relative path with $(CURDIR), which is a make variable that always expands to the build root regardless of working-directory shifts:
This matches the pattern already used two lines above in
override_dh_auto_test:Relation to PR #1711
PR #1711 fixed the first failure mode (binary not staged to
debian/tmp/, sodh_installcouldn't find it). This PR fixes the second failure mode (binary is staged buthelp2mancan't find it due to relative PATH). Both are needed for a consistently green Debian build.