[gimp/wip/Jehan/native-win64-build: 2/4] Cleanup the Gitlab runner manually.




commit 4345bb7d0a159723faba20f5df789fb82a1c6d6b
Author: Jehan <jehan girinstud io>
Date:   Mon May 3 16:08:03 2021 +0200

    Cleanup the Gitlab runner manually.
    
    Ok so this is horrible, but this is the only way I found to get past
    some errors. The build would break randomly (sometimes it would,
    sometimes not, with the same gitlab-ci rules) because of existing files.
    The errors would be the following when trying to install dependency
    packages with pacman:
    
    > mingw-w64-x86_64-glib2: /mingw64/bin/libglib-2.0-0.dll exists in filesystem
    
    At first I thought it was a bug in Pacman or MSYS2, but on some runners,
    I had such warnings at the very start of the runner (note: on some
    runners, the warnings would not be displayed even though the final
    conflicting files error would still happen at the end of the logs):
    
    > warning: failed to remove mingw64/bin/libglib-2.0-0.dll: Invalid argument
    
    It looks like it might be related to this Gitlab bug where a runner
    would fail to clean its environment:
    https://gitlab.com/gitlab-org/gitlab-runner/-/issues/1839
    
    In any case, the only way I found so far is to manually remove the
    conflicting files before installing the packages supposed to install
    these. This is completely horrible (and I sure hope it won't come up
    again with different files each time) but really the only workaround I
    found so far (I think a real solution will have to come from Gitlab code
    or from the GNOME admins, not sure what is the exact source of the
    problem).

 build/windows/build-msys2.sh | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
---
diff --git a/build/windows/build-msys2.sh b/build/windows/build-msys2.sh
index dc4221f76d..68bbe9183e 100644
--- a/build/windows/build-msys2.sh
+++ b/build/windows/build-msys2.sh
@@ -8,6 +8,22 @@ else
     export MSYS2_ARCH="x86_64"
 fi
 
+# Why do we even have to remove these manually? The whole thing is
+# messed up, but it looks like the Gitlab runner fails to clean properly
+# (it spews a bunch of "failed to remove" warnings at runner start, then
+# ends with a "error: failed to commit transaction (conflicting files)"
+# listing the various files it failed to remove).
+# Might be tied to: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/1839
+rm -f /c/msys64/mingw64/bin/libpcre-1.dll
+rm -f /c/msys64/mingw64/bin/libgio-2.0-0.dll
+rm -f /c/msys64/mingw64/bin/libglib-2.0-0.dll
+rm -f /c/msys64/mingw64/bin/libgmodule-2.0-0.dll
+rm -f /c/msys64/mingw64/bin/libgobject-2.0-0.dll
+rm -f /c/msys64/mingw64/bin/libpng16-16.dll
+rm -f /c/msys64/mingw64/bin/gdk-pixbuf-pixdata.exe
+rm -f /c/msys64/mingw64/bin/libgdk_pixbuf-2.0-0.dll
+rm -f /c/msys64/mingw64/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.dll
+
 # Update everything
 pacman --noconfirm -Suy
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]