Files
maas-samba-ad/scripts/ci/decide-build.sh
ilkermanap 5c57215a37
All checks were successful
build-image / build (push) Successful in 2s
Stop rebuilding the image every night when nothing has changed
The daily workflow already had a gate, but it could never say no: both of its
version comparisons were guaranteed to differ.

The image installs samba from trixie-security (2:4.22.10+dfsg-0+deb13u2) while
decide-build.sh read only trixie/main (...u1), so the versions never matched.
And image-info recorded the kernel as the ABI string from /boot/vmlinuz-*
(6.12.107+deb13-amd64), which is a package-name suffix, while the script
compared it against the archive's package version (6.12.107-1) — two formats
that cannot match by construction. Either one alone forced a build; together
they produced a fresh multi-hundred-megabyte release every morning for nothing.

Merge trixie, trixie-updates and trixie-security before picking the newest
version, and record kernel_version in image-info so there is something
comparable on both sides. Compare with dpkg instead of sort -V, which
mishandles epochs and tildes, and with "gt" instead of "!=" so an image that is
somehow ahead of the archive cannot spin in a rebuild loop.

Verified against the live archive and a stubbed release API: archive == image
now yields build=no, and the samba, kernel, age, first-build and
image-ahead-of-archive branches all decide correctly.

Releases published before this change carry no kernel_version, so the kernel
check is skipped for them and says so on stderr rather than passing silently.
The next build closes that gap.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 13:32:05 +02:00

5.7 KiB
Executable File