setup-mingw64.ps1 bootstrap does not do a sufficient number of initial update loops. This results in an incomplete msys2 setup and outdated core packages. The current setup-mingw64.ps1 codebase does usually only one update. I recommend, like others on the Internet, a looped update that keeps updating until it gets 'there is nothing to do' for both update categories. To isolate this 1. I put an 'exit' in the bootstrap after the two pacman updates 2. started an install using this modified bootstrap 3. started a msys2 prompt 4. typed 'pacman --noconfirm -Syuu', it causes 75 packages to update. Some of them core like: coreutils icu ncurses (see bug https://bugs.gnucash.org/show_bug.cgi?id=797259) openssl libxml2 curl ...and ~70 more The bootstrap later does not use the '-Su' update flag on pacman to do a system-wide package update -- these 75 may remain outdated. I recommend the bootstrap code be updated to do two things: 1. Kill any running processes between updates. This is important because some processes like gpg-agent and dirmgmr continue running in the background and may prevent updating the 6 core packages of filesystem, msys2-runtime, etc. 2. loop updates until 'there is nothing to do' I have powershell code that does this already in the Windows build Dockerfile that can be leveraged.
I trust that you mean killing any MSYS2 processes, not rebooting Windows. Note the terminal message displayed before setup-mingw64 runs the second update: "Updating the installation. Accept the proposed changes. If the window doesn't close on its own then close it and re-run the script when it finishes." That was predicated on the claim in the MSYS2 docs from two years ago that the shell wouldn't return and so the script would hang if the update wanted more updating. If that's not the case then we do need a different approach. How do you detect in powershell that pacman has nothing more to update?
How? Starts at https://github.com/diablodale/gnucash-dev-docker/blob/326e8d7d1eed5278350213d2c01fb804266c5183/windows.dockerfile#L73