Makefile: scope rm to this build's arch, don't erase sibling builds
All checks were successful
Forgejo Release postit-deb / release (push) Successful in 2m39s
All checks were successful
Forgejo Release postit-deb / release (push) Successful in 2m39s
When the workflow runs make deb twice in a row (amd64, then
arm64), the second rm -f ../postit_*1.0.6-1*.deb glob matched
BOTH postit_1.0.6-1_amd64.deb (produced by the first build)
and postit_1.0.6-1_arm64.deb (about to be produced). So the
second rm was erasing the first build's output before its own
make ran.
Result: postit_1.0.6-1_amd64.deb was created and then deleted
by the arm64 build, leaving only the .deb arm64 in /src/. The
'Localiser les .deb produits' step failed with amd64=''.
Scope the rm to this build's arch tag via DPKG_HOST:
rm -f ../postit_<TAG>-1_${DPKG_HOST}.deb \
../postit_<TAG>-1_${DPKG_HOST}.buildinfo \
../postit_<TAG>-1_${DPKG_HOST}.changes
DPKG_HOST is already computed in the recipe for the dpkg-
buildpackage call — we just reuse it for the rm.
This commit is contained in:
parent
c2cdb88e64
commit
bdd7205667
1 changed files with 7 additions and 4 deletions
11
Makefile
11
Makefile
|
|
@ -38,10 +38,13 @@ deb:
|
|||
# step the .deb always comes out as the version hardcoded in
|
||||
# debian/changelog.in, regardless of POSTIT_GIT_TAG.
|
||||
sed 's/@VERSION@/$(POSTIT_GIT_TAG)/g' debian/changelog.in > debian/changelog
|
||||
# Remove any residual .deb from previous runs (same name
|
||||
# pattern would otherwise be re-used by dpkg-deb if the
|
||||
# previous run left it lying around).
|
||||
rm -f ../postit_*$(POSTIT_GIT_TAG)-1*.deb ../postit_*.buildinfo ../postit_*.changes
|
||||
# Remove only this build's residual .deb (avoid glob-matching
|
||||
# .debs from sibling builds — the workflow invokes us once per
|
||||
# architecture, and a wide glob would erase the .deb the
|
||||
# previous build just produced). The pattern is the same one
|
||||
# dpkg-deb will reuse if we don't clean up first: postit_<ver>-
|
||||
# 1_<host_arch>.deb.
|
||||
rm -f ../postit_$(POSTIT_GIT_TAG)-1_$${DPKG_HOST}.deb ../postit_$(POSTIT_GIT_TAG)-1_$${DPKG_HOST}.buildinfo ../postit_$(POSTIT_GIT_TAG)-1_$${DPKG_HOST}.changes
|
||||
# Use dpkg-architecture to set the target arch correctly for
|
||||
# cross-builds. For POSTIT_RUNTIME=linux-arm64, this exports
|
||||
# DEB_HOST_ARCH=arm64 (and friends) so dpkg-buildpackage names
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue