Skip to content

Commit 154b1a6

Browse files
committed
Try to enable ports APT sources unconditionally
This does not work as written, at least on s390x, because the ports list is already written there from the base image. The existing file is actually better than what this writes, though what this writes is simpler and so might potentially be easier to debug or reason about. Unfortunately, if we clobber the existing file with this one, the error installing `git:s390x` is unchanged. Uninstalling the old `amd64` `git` package first (not shown here) and packages installed as its dependencies doesn't help either.
1 parent db8697b commit 154b1a6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

etc/docker/Dockerfile.test-cross

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ FROM ghcr.io/cross-rs/${TARGET}:latest
55
ARG TARGET
66

77
RUN set -uC && \
8+
apt-get update && \
9+
apt-get install --no-install-recommends -y apt-transport-https gnupg && \
810
apt_suffix= && \
911
if target_arch="$(dpkg-architecture --host-type "$TARGET" --query DEB_HOST_ARCH)"; then \
1012
dpkg --add-architecture "$target_arch" && \
1113
apt_suffix=":$target_arch"; \
1214
fi && \
13-
apt-get update && \
14-
apt-get install --no-install-recommends -y apt-transport-https gnupg && \
1515
release="$(sed -n 's/^VERSION_CODENAME=//p' /etc/os-release)" && \
16+
for pocket in "$release" "$release-security" "$release-updates" "$release-backports"; do \
17+
echo "deb http://ports.ubuntu.com/ubuntu-ports/ $pocket main universe"; \
18+
done >/etc/apt/sources.list.d/ports.list && \
1619
echo "deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu $release main" \
1720
>/etc/apt/sources.list.d/git-core-ubuntu-ppa.list && \
1821
apt-key adv --keyserver keyserver.ubuntu.com \

0 commit comments

Comments
 (0)