I am using Arch. Last night I started installing a package whose repo size is ~2GB, but my internet connection is very slow, so I let it run overnight. It finished the download, but timed out at the sudo password prompt.
Normally I would simply rerun it and let it do its thing, but when I tried that, the installation failed because the partition where yay's cache resides is quite full, so the package cannot be built there. That would've happened anyway, obviously, regardless of the timeout.
I'm curious is it possible to move the downloaded repo to a different partition, and tell yay to continue where it left off, or, alternatively, if I can finish the build manually without breaking anything (e.g. yay's awareness of installed packages).
I googled around a bit, and found the --builddir flag, so I tried simply giving it an alternate build directory on another partition. That did what I expected, but it still had to redownload everything.
So I aborted it and copied the package repository (the one downloaded overnight) to that directory and ran yay again, hoping it would recognize the repository and continue where it left off. But it got confused because the branch name was the same as the directory name:
error resetting <my_package>: fatal: ambiguous argument 'HEAD': both revision and filename Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' Finally, I tried running the installation manually by running makepkg -si in that alternative builddir, and I got the following error:
ERROR: /path/to/builddir/package is not a clone of git://<url_to_package> Aborting... I'll just delete everything and redownload it to the alternate builddir, but I'm curious what would be the best way to install the package without redownloading everything if I really had to.
yay, and probably other AUR helpers, the password is asked 1) before downloading AUR packages themselves, if they require installing dependencies, and/or 2) after the first AUR package has been built, to install it. If you are in case 2, the directory~/.cache/yay/<package_name>likely contains the built package as a<package_name..>.pkg.tar.zstand you can simply install it usingsudo pacman -U ~/.cache/yay/<package_name>/<package_name...>.pkg.tar.zst.linux-drm-tip-gitand I ranyay -S linux-drm-tip-gitlast night, and it started cloning from the repo. It went on for several hours and hit only ~6% when I went to bed, and in the morning I saw the yay sudo timeout. Because my home partition was full, Irsync -av-ed~/.cache/yay/linux-drm-tip-gitto a different partition and deleted the original. In that copy, I don't see any .pkg.tar.zst files or anything like that. How come it asked me for the password after cloning, but before building?