From 58ab466fd85861689a5b9b81de610404eeacaa6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 7 Jan 2020 09:54:29 +0100 Subject: [PATCH] Windows: Prevent 32-bit build failure from skipping symlinks Like most programming language, in a logic statement `A && B || C`, bash will not evaluate B if A is false (failing in our case). Using `A && (B || C)` to prevent that. A build error in the Windows 32-bit Mono build thus caused skipping all subsequent `ln` statements up until `|| /bin/true`, which is used to link only the folders which are missing from the self-built mono prefix. The build error still needs to be fixed but it doesn't seem to prevent using the resulting container to build 32-bit Windows binaries. --- Dockerfile.windows | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile.windows b/Dockerfile.windows index b9ade70..d1966b5 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -20,16 +20,16 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand rm -f /root/dependencies/mono-64/bin/mono /root/dependencies/mono-64/bin/mono-sgen && \ ln -s /usr/bin/mono /root/dependencies/mono-64/bin/mono && \ ln -s /usr/bin/mono-sgen /root/dependencies/mono-64/bin/mono-sgen && \ - ln -sf /usr/lib/mono/* /root/dependencies/mono-64/lib/mono || /bin/true && \ + (ln -sf /usr/lib/mono/* /root/dependencies/mono-64/lib/mono/ || /bin/true) && \ cp -rvp /etc/mono /root/dependencies/mono-64/etc && \ export WINE_BITS=32 && \ - bash /root/files/mono-build-win32.sh --prefix=/root/dependencies/mono-32 --host=i686-w64-mingw32 && \ + (bash /root/files/mono-build-win32.sh --prefix=/root/dependencies/mono-32 --host=i686-w64-mingw32 || /bin/true) && \ cd /root && \ cp /root/dependencies/mono-32/bin/libMonoPosixHelper.dll /root/dependencies/mono-32/bin/MonoPosixHelper.dll && \ rm -f /root/dependencies/mono-32/bin/mono /root/dependencies/mono-32/bin/mono-sgen && \ ln -s /usr/bin/mono /root/dependencies/mono-32/bin/mono && \ ln -s /usr/bin/mono-sgen /root/dependencies/mono-32/bin/mono-sgen && \ - ln -sf /usr/lib/mono/* /root/dependencies/mono-32/lib/mono || /bin/true && \ + (ln -sf /usr/lib/mono/* /root/dependencies/mono-32/lib/mono/ || /bin/true) && \ cp -rvp /etc/mono /root/dependencies/mono-32/etc && \ rm -rf /root/mono && \ dnf -y remove wine