Jguer / yay

Yet another Yogurt - An AUR Helper written in Go
GNU General Public License v3.0
11.24k stars 364 forks source link

Replacement of a conflicting package doesn't replace the debug counterpart, and fails on it #2499

Open Porkepix opened 2 months ago

Porkepix commented 2 months ago

Affected Version

yay v12.3.5 - libalpm v14.0.0

Describe the bug

Many AUR packages now defaults to install a -debug counterpart of their package. However when such a package is replaced by another conflicting one, the -debug package gets in the way as yay isn't removing it to install the new -debug one.

Reproduction Steps

  1. yay -S [package conflicting with one on the computer and with a -debug one]
  2. See the following issue

Expected behavior

It should also remove to replace the -debug counterpart.

Output

==> Finished making: foo 0.6.0-1 (Wed 11 Sep 2024 13:45:13 CEST)
==> Cleaning up...
loading packages...
resolving dependencies...
looking for conflicting packages...
:: foo-0.6.0-1 and foo-bar-0.6.0-5 are in conflict. Remove foo-bar? [y/N] Y

Packages (3) foo-bar-0.6.0-5 [removal]  foo-0.6.0-1  foo-debug-0.6.0-1

Total Installed Size:  20.93 MiB
Net Upgrade Size:       3.81 MiB

:: Proceed with installation? [Y/n]
(2/2) checking keys in keyring                                                  [##############################################] 100%
(2/2) checking package integrity                                                [##############################################] 100%
(2/2) loading package files                                                     [##############################################] 100%
(2/2) checking for file conflicts                                               [##############################################] 100%
error: failed to commit transaction (conflicting files)
foo-debug: /usr/lib/debug/usr/bin/foo.debug exists in filesystem (owned by foo-bar-debug)
Errors occurred, no packages were upgraded.
 -> error installing: [/home/$USER/.cache/yay/foo/foo-0.6.0-1-x86_64.pkg.tar.zst /home/$USER/.cache/yay/foo/foo-debug-0.6.0-1-x86_64.pkg.tar.zst] - exit status 1
mb6ockatf commented 1 month ago

This might be useful