ci: fix pacman.conf path and move gcc removal after keyring update

Two fixes based on review feedback from OmarAzizi:

1. The pacman.conf path was wrong. /etc/pacman.conf does not exist on
   the AppVeyor Windows image; the correct path is c:/msys64/etc/pacman.conf.
   This explains why the SigLevel rewrite had no effect in previous attempts.

2. Move 'pacman -Rsc mingw-w64-%CPU%-gcc gcc' to after both -Syuu runs.
   Removing gcc before the keyring and package database are fully updated
   can leave the environment in a broken state if the update fails midway.
This commit is contained in:
LD-RW 2026-04-11 01:44:55 +03:00
parent fdaab6568f
commit 82cd011fe6

View file

@ -38,12 +38,12 @@ environment:
install:
- set PATH=c:\msys64\%MSYSTEM%\bin;c:\msys64\usr\bin;%PATH%
- if defined MSVC call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %MSVC%
- if defined MSVC pacman --noconfirm -Rsc mingw-w64-%CPU%-gcc gcc
- bash -c "python3 -c \"import re; f='c:/msys64/etc/pacman.conf'; c=open(f).read(); open(f,'w').write(re.sub(r'^SigLevel\s*=.*$', 'SigLevel = Never', c, flags=re.MULTILINE))\""
- pacman --noconfirm -Syuu
- pacman --noconfirm -S msys2-keyring
- bash -c "python3 -c \"import re; f='c:/msys64/etc/pacman.conf'; c=open(f).read(); open(f,'w').write(re.sub(r'^SigLevel\s*=.*$', 'SigLevel = Required DatabaseOptional', c, flags=re.MULTILINE))\""
- pacman --noconfirm -Syuu
- if defined MSVC pacman --noconfirm -Rsc mingw-w64-%CPU%-gcc gcc
- pacman --noconfirm -S autoconf
build_script: