Skip to content

Rename local pacman db if needed #619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion git-extra/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pkgbase="mingw-w64-${_realname}"
pkgname=($_realname
"${MINGW_PACKAGE_PREFIX}-${_realname}")
_ver_base=1.1
pkgver=1.1.655.d4631bf56
pkgver=1.1.657.d7f05a9c2
pkgrel=1
pkgdesc="Git for Windows extra files"
arch=('any')
Expand Down
12 changes: 12 additions & 0 deletions git-extra/git-extra.install
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,18 @@ GITATTRIBUTES
! grep -q 'https://dl.bintray.com/git-for-windows/pacman/x86_64' etc/pacman.conf ||
sed -i -e 's/https:\/\/dl\.bintray\.com\/git-for-windows\/pacman\/x86_64/https:\/\/wingit.blob.core.windows.net\/x86-64/g' etc/pacman.conf

# The main pacman database was renamed from `git-for-windows` to `git-for-windows-<arch>`
for ext in db db.sig files files.sig
do
if ! test -f var/lib/pacman/sync/git-for-windows-$arch.$ext
then
mv var/lib/pacman/sync/git-for-windows.$ext var/lib/pacman/sync/git-for-windows-$arch.$ext
elif test -f var/lib/pacman/sync/git-for-windows.$ext
then
rm var/lib/pacman/sync/git-for-windows.$ext
fi
done

test i686 != $"uname -m" ||
case "$(md5sum.exe < /msys2.ico)" in
292ad5cd*) cp /usr/share/git/msys2-32.ico /msys2.ico;;
Expand Down
12 changes: 12 additions & 0 deletions git-extra/git-extra.install.in
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,18 @@ GITATTRIBUTES
! grep -q 'https://dl.bintray.com/git-for-windows/pacman/x86_64' etc/pacman.conf ||
sed -i -e 's/https:\/\/dl\.bintray\.com\/git-for-windows\/pacman\/x86_64/https:\/\/wingit.blob.core.windows.net\/x86-64/g' etc/pacman.conf

# The main pacman database was renamed from `git-for-windows` to `git-for-windows-<arch>`
for ext in db db.sig files files.sig
do
if ! test -f var/lib/pacman/sync/git-for-windows-$arch.$ext
then
mv var/lib/pacman/sync/git-for-windows.$ext var/lib/pacman/sync/git-for-windows-$arch.$ext
elif test -f var/lib/pacman/sync/git-for-windows.$ext
then
rm var/lib/pacman/sync/git-for-windows.$ext
fi
done

test i686 != $"uname -m" ||
case "$(md5sum.exe < /msys2.ico)" in
292ad5cd*) cp /usr/share/git/msys2-32.ico /msys2.ico;;
Expand Down