yay
yay copied to clipboard
yay fails when `clone.defaultRemoteName` is not `origin` in user's gitconfig
Affected Version
$ yay -V
yay v12.3.1 - libalpm v13.0.2
Describe the bug
If clone.defaultRemoteName
in the user's global ~/.gitconfig
is not set to origin
, makepkg
fails. makepkg
explicitly requires the remote's name to be origin
and explicitly sets --origin origin
when cloning.
Reproduction Steps
-
git config --global clone.defaultRemoteName upstream
- Clean install any package from git --
yay -S yay-git
- makepkg fails with
==> ERROR: /home/abex/.cache/yay/yay-git/yay is not a clone of https://github.com/Jguer/yay.git
Expected behavior
Install succeeds
Output
$ yay -S yay-git
AUR Explicit (1): yay-git-12.3.1.r0.g03e89d6-1
:: (1/1) Downloaded PKGBUILD: yay-git
1 yay-git (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
1 yay-git (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
==> Making package: yay-git 12.3.1.r0.g03e89d6-1 (Wed 06 Mar 2024 11:32:14 PM MST)
==> Retrieving sources...
-> Cloning yay git repo...
Cloning into bare repository '/home/abex/.cache/yay/yay-git/yay'...
remote: Enumerating objects: 15473, done.
remote: Counting objects: 100% (2418/2418), done.
remote: Compressing objects: 100% (925/925), done.
remote: Total 15473 (delta 1630), reused 2209 (delta 1465), pack-reused 13055
Receiving objects: 100% (15473/15473), 8.99 MiB | 17.87 MiB/s, done.
Resolving deltas: 100% (9932/9932), done.
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha256sums...
yay ... Skipped
:: (1/1) Parsing SRCINFO: yay-git
==> Making package: yay-git 12.3.1.r0.g03e89d6-1 (Wed 06 Mar 2024 11:32:18 PM MST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> ERROR: /home/abex/.cache/yay/yay-git/yay is not a clone of https://github.com/Jguer/yay.git
Aborting...
-> error making: yay-git-exit status 1
-> Failed to install the following packages. Manual intervention is required:
yay-git - exit status 1