From ce032c79515557ceb644d802fe980fd55274a4a3 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 12 Jul 2017 22:48:22 +0200 Subject: [PATCH] sdk-installer: ensure that Git for Windows' keyring is imported This is required so that the SDK can be installed fully, now that we sign each and every package in Git for Windows' Pacman repository. As the post-install script of msys2-keyring destroys every previous attempt to initialize Pacman's keyring, we need to install msys2-keyring (and gnupg) specifically before adding Git for Windows' keys. Signed-off-by: Johannes Schindelin --- sdk-installer/setup-git-sdk.bat | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sdk-installer/setup-git-sdk.bat b/sdk-installer/setup-git-sdk.bat index 52a137fbee..c38750b600 100755 --- a/sdk-installer/setup-git-sdk.bat +++ b/sdk-installer/setup-git-sdk.bat @@ -104,6 +104,25 @@ @IF ERRORLEVEL 1 GOTO INSTALL_INFO +@SET /A counter=0 +:INSTALL_MSYS2_KEYRING +@SET /A counter+=1 +@IF %counter% GEQ 5 @( + @ECHO Could not install msys2-keyring + @PAUSE + @EXIT 1 +) + +@REM next, force update msys2-keyring +@"%cwd%"\usr\bin\pacman -S --needed --force --noconfirm gnupg msys2-keyring + +@IF ERRORLEVEL 1 GOTO INSTALL_MSYS2_KEYRING + +@REM now, add Git for Windows' keyring +@"%cwd%"\usr\bin\bash.exe -l -c ^ + '/usr/bin/bash /usr/bin/pacman-key --populate git-for-windows' +@IF ERRORLEVEL 1 PAUSE + @SET /A counter=0 :INSTALL_PACMAN @SET /A counter+=1