Skip to content

Commit a7e97db

Browse files
roxellbhcopeland
authored andcommitted
docker: skip equivs package when real cross compiler is installed
On amd64 runners the equivs step replaces the real cross compiler: dpkg: warning: downgrading gcc-aarch64-linux-gnu (4:14.2.0-1) to (999.0) FAIL - aarch64-linux-gnu-gcc in PATH The fake package removes the compiler binary. Check if the real package is already installed before creating the fake one. Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
1 parent 7850bbe commit a7e97db

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

support/docker/Dockerfile.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ RUN if [ -z "${HOSTARCH}" ]; then exit; fi; \
263263
fi; \
264264
host_gnu=$(dpkg-architecture -a "${arch}" -q DEB_HOST_GNU_TYPE 2>/dev/null | sed 's/_/-/g'); \
265265
if [ -z "${host_gnu}" ]; then exit; fi; \
266+
: skip if the real package is already installed && \
267+
if dpkg -l "gcc-${host_gnu}" 2>/dev/null | grep -q "^ii"; then exit; fi; \
266268
mkdir -p /tmp/equivs && \
267269
cd /tmp/equivs && \
268270
printf "Section: misc\nPriority: optional\nStandards-Version: 3.9.2\nPackage: gcc-${host_gnu}\nVersion: 999.0\nMaintainer: tuxmake <tuxsuite@linaro.org>\nDescription: Fake package to satisfy gcc-${host_gnu} dependency\n The actual cross-compiler is already installed with a versioned name.\n" > gcc-${host_gnu} && \

0 commit comments

Comments
 (0)