$ yay
$ yay -Syu
$ yay --help
$
...it doesn't do anything. No error. No diagnostic output. Nothing.
Try rebuilding it, it built and works OK for me (yay not yay-git) but recently it's been upgraded to version 10.2.2-1, see what pacman -Qi yay says.
I tried rebuilding it, but "makepkg -si" refuses to overwrite, and I can't find a "--force" option, or similar...
...
warning: yay-10.2.2-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Package (1) Old Version New Version Net Change
yay 10.2.2-1 10.2.2-1 7.80 MiB
Total Installed Size: 7.80 MiB
:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [########################################################################] 100%
(1/1) checking package integrity [########################################################################] 100%
(1/1) loading package files [########################################################################] 100%
(1/1) checking for file conflicts [########################################################################] 100%
error: failed to commit transaction (conflicting files)
yay: /usr/bin/yay exists in filesystem
yay: /usr/share/bash-completion/completions/yay exists in filesystem
yay: /usr/share/fish/vendor_completions.d/yay.fish exists in filesystem
yay: /usr/share/locale/en/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/es/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/eu/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/fr_FR/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/ja/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/pl_PL/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/pt/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/pt_BR/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/ru_RU/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/zh_CN/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/man/man8/yay.8.gz exists in filesystem
yay: /usr/share/zsh/site-functions/_yay exists in filesystem
Errors occurred, no packages were upgraded.
==> WARNING: Failed to install built package(s).
I guess I could manually delete every single one of those files... But... I'd kinda like to figure out what went wrong...
$ sudo pacman -Qi yay
Name : yay
Version : 10.2.2-1
Description : None
Architecture : None
URL : None
Licenses : None
Groups : None
Provides : None
Depends On : None
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 0.00 B
Packager : None
Build Date : None
Install Date : None
Install Reason : Explicitly installed
Install Script : No
Validated By : Unknown
Strange is that is still works on one machine, but not another...
The installed size seems odd... 0.00? Hmm...
pacman -R yay, remove old yay files, and build it again
The "files exist" error messages come from the package manager
pacman (which is called by
makepkg).
Delete all previously built yay packages (or move them to another folder), run
makepkg -s
(no -i, so you can call pacman manually)
and run
pacman -U yay*.pkg.* --overwrite '*'
The --overwrite option is basically a more granular version of --force, you can specify what kind of filenames can be overwritten (and '*' means all of them).
Overall, this is a very weird error. It's even weirder that these files which used to belong to the yay package aren't associated with it anymore (otherwise pacman would let an update/reinstall overwrite them).
...and it just got weirder...
$ sudo pacman -R yay
checking dependencies...
Package (1) Old Version Net Change
yay 10.2.2-1 0.00 MiB
:: Do you want to remove these packages? [Y/n]
:: Processing package changes...
(1/1) removing yay [########################################################################] 100%
So, problem solved, right?
$ cd yay
yay $ makepkg -si
==> WARNING: A package has already been built, installing existing package...
==> Installing package yay with pacman -U...
loading packages...
resolving dependencies...
looking for conflicting packages...
Package (1) New Version Net Change
yay 10.2.2-1 7.80 MiB
Total Installed Size: 7.80 MiB
:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [########################################################################] 100%
(1/1) checking package integrity [########################################################################] 100%
(1/1) loading package files [########################################################################] 100%
(1/1) checking for file conflicts [########################################################################] 100%
error: failed to commit transaction (conflicting files)
yay: /usr/bin/yay exists in filesystem
yay: /usr/share/bash-completion/completions/yay exists in filesystem
yay: /usr/share/fish/vendor_completions.d/yay.fish exists in filesystem
yay: /usr/share/locale/en/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/es/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/eu/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/fr_FR/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/ja/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/pl_PL/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/pt/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/pt_BR/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/ru_RU/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/locale/zh_CN/LC_MESSAGES/yay.mo exists in filesystem
yay: /usr/share/man/man8/yay.8.gz exists in filesystem
yay: /usr/share/zsh/site-functions/_yay exists in filesystem
Errors occurred, no packages were upgraded.
==> WARNING: Failed to install built package(s).
$
Supposedly it removed it, but then, it's still there... lolwut?
So, I just manually deleted every one of them...
$ sudo rm /usr/bin/yay
$ sudo rm /usr/share/bash-completion/completions/yay
$ sudo rm /usr/share/fish/vendor_completions.d/yay.fish
$ sudo rm /usr/share/locale/en/LC_MESSAGES/yay.mo
$ sudo rm /usr/share/locale/es/LC_MESSAGES/yay.mo
$ sudo rm /usr/share/locale/eu/LC_MESSAGES/yay.mo
$ sudo rm /usr/share/locale/fr_FR/LC_MESSAGES/yay.mo
$ sudo rm /usr/share/locale/ja/LC_MESSAGES/yay.mo
$ sudo rm /usr/share/locale/pl_PL/LC_MESSAGES/yay.mo
$ sudo rm /usr/share/locale/pt/LC_MESSAGES/yay.mo
$ sudo rm /usr/share/locale/pt_BR/LC_MESSAGES/yay.mo
$ sudo rm /usr/share/locale/ru_RU/LC_MESSAGES/yay.mo
$ sudo rm /usr/share/locale/zh_CN/LC_MESSAGES/yay.mo
$ sudo rm /usr/share/man/man8/yay.8.gz
$ sudo rm /usr/share/zsh/site-functions/_yay
I'll try reinstalling it again...
It should be noted that yay has updated itself many times... This isn't a new install... You can see it's the most recent version. It updated itself with no issues, just like every other time for the past year...
I know you mentioned not using -i, I'm working up to that...
yay $ makepkg -si
==> WARNING: A package has already been built, installing existing package...
==> Installing package yay with pacman -U...
loading packages...
resolving dependencies...
looking for conflicting packages...
Package (1) New Version Net Change
yay 10.2.2-1 7.80 MiB
Total Installed Size: 7.80 MiB
:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [##############################################] 100%
(1/1) checking package integrity [##############################################] 100%
(1/1) loading package files [##############################################] 100%
(1/1) checking for file conflicts [##############################################] 100%
(1/1) checking available disk space [##############################################] 100%
:: Processing package changes...
(1/1) installing yay [##############################################] 100%
Optional dependencies for yay
sudo [installed]
$ yay
:: Synchronizing package databases...
system 242.2 KiB 295 KiB/s 00:01 [##############################################] 100%
world 1706.1 KiB 539 KiB/s 00:03 [##############################################] 100%
galaxy 1624.8 KiB 584 KiB/s 00:03 [##############################################] 100%
...
So... Maybe it was some bizarre filesystem issue? Everything seems fine now...
I should follow up with a thorough FS check in case something else has been effected that I just haven't run into yet...
I don't know why tho... Everything has been smooth, shut down properly...
I forced an FSCK on the partition in question... Nothing...
[shrug]
It works now...
I hate it when Failure Mode Analysis tells me nothing... Magic?
Anyway, moving on, thanks guys.
Take a look in /var/lib/pacman/local/yay-10.2.2-1 as the problem was most likely due to the files in there being incorrect somehow. Pacman has a database which is managed by libalpm functions. You could get a similar effect with the files existing thing by doing pacman -R --dbonly yay which deletes that db directory but not the package files. Some guesses at the cause could be that perhaps yay was in the middle of being upgraded and the process was interupted somehow by a shutdown or the terminal being closed for example? Or possibly yay was running in one terminal and in another some other pacman action was called, thus locking the db at some crucial moment when yay tried to use pacman.