Files
Zakk fdfdf47382 .github/stage3: update the image from binary packages only
Portage builds an update from source when the Gentoo binhost has no
binary package for it yet. On 2026-11-22 LLVM 23 went stable on amd64
before the binhost had it, and building it did not finish within the
180-minute job limit, so the amd64 images were not updated.

--getbinpkgonly skips such updates until the binhost catches up. It
enables --rebuilt-binaries, which would reinstall every package rebuilt
on the binhost, and disables --binpkg-respect-use, which would accept
binary packages built with other USE flags; both are set back.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Zakk <zakk@gentoozh.org>
2026-11-22 21:03:09 +11:00

20 lines
866 B
Docker

ARG PROFILE
FROM gentoo/stage3:${PROFILE} AS update
ARG PROFILE IMAGE BASE RUN
# stage3 has no world file: @world covers only @system, and depclean would drop the rest
RUN emerge-webrsync --no-pgp-verify \
&& getuto \
&& emerge --quiet --update --deep --newuse --with-bdeps=y \
--getbinpkgonly --rebuilt-binaries=n --binpkg-respect-use=y @installed \
&& FEATURES="getbinpkg" emerge --quiet @preserved-rebuild \
&& printf 'image: %s\nbase: gentoo/stage3:%s@%s\nimage gentoo: %s\nimage run: %s\n' \
"$IMAGE" "$PROFILE" "$BASE" "$(cat /var/db/repos/gentoo/metadata/timestamp.commit)" "$RUN" \
> /etc/gentoo-zh-ci-image \
&& rm -rf /var/db/repos/gentoo /var/cache/distfiles/* /var/cache/binpkgs/*
# one layer, as gentoo/stage3 itself is built: the update layer would duplicate every replaced file
FROM scratch
COPY --from=update / /
CMD ["/bin/bash"]