yay icon indicating copy to clipboard operation
yay copied to clipboard

Manage interdependency/conflict between AUR and repo packages with versions restrictions

Open Porkepix opened this issue 2 years ago • 5 comments

Affected Version

yay v11.0.2 - libalpm v13.0.1

Describe the bug

Some packages are interdependent, which the package manager should be able to tackle, but problem arise if it happens between an AUR package and a normal repo package. Here's an example with archlinux.org/packages/community/any/gajim and aur.archlinux.org/packages/gajim-plugin-omemo

yay refuse to upgrade gajim because it would break the plugin versions restrictions, but cannot upgrade the plugin due to versions restrictions on the gajim package.

Reproduction Steps

  1. Have gajim and gajim-plugin-omemo installed with out of date versions
  2. Try to upgrade them
  3. It'll fail

Expected behavior

It should be able to tackle the versions requirements as it knows it'll upgrade both packages.

Output

:: 7 Packages to upgrade.
5  community/gajim         1.2.2-2              -> 1.3.3-1
4  community/python-xapp   2.2.1-1              -> 2.2.1-2
3  aur/gajim-plugin-omemo  2.6.80-3             -> 2.7.14-1
==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
==> ^3-5
:: Checking for conflicts...
:: Checking for inner conflicts...
[Repo:2]  gajim-1.3.3-1  python-xapp-2.2.1-2
[Aur:1]  gajim-plugin-omemo-2.7.14-1

  1 gajim-plugin-omemo               (Installed) (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: (1/1) Downloaded PKGBUILD: gajim-plugin-omemo
  1 gajim-plugin-omemo               (Installed) (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: (1/1) Parsing SRCINFO: gajim-plugin-omemo
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing gajim (1.3.3-1) breaks dependency 'gajim<=1.2.90' required by gajim-plugin-omemo
 -> error installing repo packages

Porkepix avatar Dec 10 '21 11:12 Porkepix

What should have solve the issue? Because I'm still seeing it.

Porkepix avatar Feb 21 '23 08:02 Porkepix

Can you try yay-git with the following options in your config.json??

  "debug": true,
  "newinstallengine": true,

Jguer avatar Feb 21 '23 09:02 Jguer

:: 3 Packages to upgrade.
3  community/gajim         1.2.2-2  -> 1.6.1-1
2  aur/gajim-plugin-omemo  2.6.80-3 -> 2.9.0-1
==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
 -> May cause partial upgrades and break systems
==> 1
AUR Explicit (1): gajim-plugin-omemo-2.9.0-1
Sync Explicit (1): gajim-1.6.1-1
:: PKGBUILD up to date, skipping download: gajim-plugin-omemo
[DEBUG:global] running /usr/bin/makepkg --verifysource -Ccf
==> Making package: gajim-plugin-omemo 2.9.0-1 (mar. 21 févr. 2023 10:05:56)
==> Retrieving sources...
  -> Downloading omemo_2.9.0.zip...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 52786  100 52786    0     0   374k      0 --:--:-- --:--:-- --:--:--  376k
==> Validating source files with sha512sums...
    omemo_2.9.0.zip ... Passed
  1 gajim-plugin-omemo               (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
[DEBUG:global] capturing /usr/bin/git -C /home/clement/.cache/yay/gajim-plugin-omemo reset --hard HEAD
[DEBUG:global] capturing /usr/bin/git -C /home/clement/.cache/yay/gajim-plugin-omemo merge --no-edit --ff
  1 gajim-plugin-omemo               (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: (1/1) Parsing SRCINFO: gajim-plugin-omemo
[DEBUG:global] syncDeps Set{} SyncExp Set{community/gajim} aurDeps Set{} aurExp Set{}
[DEBUG:global] running /usr/bin/sudo pacman -S --config /etc/pacman.conf -- community/gajim
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing gajim (1.6.1-1) breaks dependency 'gajim<=1.2.90' required by gajim-plugin-omemo
[DEBUG:global] running /usr/bin/sudo pacman -D -q --asexplicit --config /etc/pacman.conf -- gajim
 -> error installing repo packages

Porkepix avatar Feb 21 '23 09:02 Porkepix

Indeed, this case is not solved, I'm reopening the issue but the fix might be dangerous, allowing yay to ignore package conflicts for the first install when detected

Jguer avatar Feb 21 '23 09:02 Jguer

Indeed, this case is not solved, I'm reopening the issue but the fix might be dangerous, allowing yay to ignore package conflicts for the first install when detected

What do you mean by "for the first install"?

Also, is there no way to see that the dependencies of the AUR package to be updated are satisfied by non-AUR packages and the opposite, and in such situation first build the AUR package and then install them at the same time?

Porkepix avatar Feb 21 '23 09:02 Porkepix