From 3dadf00424fb47654d622097c62b9558b28e7c73 Mon Sep 17 00:00:00 2001 From: LD-RW Date: Fri, 10 Apr 2026 22:36:54 +0300 Subject: [PATCH] ci: use python3 to rewrite SigLevel in pacman.conf sed -i with a ^SigLevel regex ran without error but had no effect -- pacman was still downloading and failing to verify .sig files, proving the SigLevel line was not actually replaced. Switch to python3 which reads and rewrites the entire file, matching any whitespace between SigLevel and = regardless of how the line is formatted in the installed pacman.conf on the AppVeyor image. --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index d5ba2b48..e63d0930 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -39,10 +39,10 @@ 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 "sed -i 's/^SigLevel.*/SigLevel = Never/' /etc/pacman.conf" + - bash -c "python3 -c \"import re; f='/etc/pacman.conf'; open(f,'w').write(re.sub(r'SigLevel\s*=\s*\S.*', 'SigLevel = Never', open(f).read()))\"" - pacman --noconfirm -Syuu - pacman --noconfirm -S msys2-keyring - - bash -c "sed -i 's/^SigLevel = Never/SigLevel = Required DatabaseOptional/' /etc/pacman.conf" + - bash -c "python3 -c \"import re; f='/etc/pacman.conf'; open(f,'w').write(re.sub(r'SigLevel\s*=\s*Never', 'SigLevel = Required DatabaseOptional', open(f).read()))\"" - pacman --noconfirm -Syuu - pacman --noconfirm -S autoconf