Skip to content

Commit fb35dc7

Browse files
committed
update-via-pacman: ensure that Git for Windows' essential packages are installed
The set of Pacman packages required to build Git for Windows' installer/portable Git/MinGit from scratch need to be installed in the `git-sdk-*` repositories, so that MinGit or other backports are possible without having to rely on external Pacman repositories whose contents might have been culled to make more space. Let's ensure that these packages (which were uninstalled as part of moving from MINGW64 to UCRT64 because their UCRT64 counterparts were not yet available) are installed. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 1441750 commit fb35dc7

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

update-via-pacman.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,20 @@ if (!(Test-Path cmd\git.exe -PathType Leaf)) {
147147
if (!$?) { die "Could not install mingw-w64-git-for-windows-addons" }
148148
}
149149

150+
# Make sure that Git for Windows' special packages are installed
151+
$missing = @()
152+
153+
foreach ($name in "cv2pdb", "curl-openssl-alternate", "git-credential-manager", "wintoast", "xpdf-tools") {
154+
$pkg = "mingw-w64-ucrt-x86_64-$name"
155+
if (-not (Get-ChildItem -Path "var/lib/pacman/local" -Directory -Filter "$pkg-[0-9]*" -ErrorAction SilentlyContinue)) {
156+
$missing += $pkg
157+
}
158+
}
159+
160+
if ($missing) {
161+
pacman -S --noconfirm @missing
162+
if (!$?) { die "Could not install $($missing -join ', ')" }
163+
}
164+
150165
# Wrapping up: re-install mingw-w64-git-extra
151166
bash -lc "pacman -S --overwrite=\* --noconfirm mingw-w64-ucrt-x86_64-git-extra"

0 commit comments

Comments
 (0)