This will make the 2-stage builds from #33062 more robust (see #33816 comment:60) and will make the
devcontainer feature based on the portability images (https://trac.sagemath.org/wiki/ReleaseTours/sage-9.7#VisualStudioCodedevcontainers) more useful.
CC: @dimpase @tobiasdiez @jhpalmieri
Component: porting
Author: Matthias Koeppe
Branch/Commit: 9696b34
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/34572