pikaur icon indicating copy to clipboard operation
pikaur copied to clipboard

Dependency issue during sysupgrade when multiple providers for the same dependency are installed at the same time and one of them is part of upgrade together with package which have that dependency

Open Eothred opened this issue 3 years ago • 4 comments

$ pikaur -Vq
Pikaur v1.9
Pacman v6.0.1 - libalpm v13.0.1 - pyalpm v0.10.6
Prerequisites:

To trigger this you need multiple java-runtime installed on your system. You also need an update of one of the older jdk's to be part of the same update (see discussion). The package need to be dependent on a newer version of jdk than the one being upgraded. In my case jabref needs jdk>16, while jdk8 and jdk11 was part of the update.

I have the following

$ pikaur -Qs java-runtime
local/java-runtime-common 3-3
    Common files for Java Runtime Environments
local/jdk8 8u301-1
    Oracle Java 8 Development Kit LTS
local/jre-openjdk 17.0.1.u12-1
    OpenJDK Java 17 full runtime environment
local/jre-openjdk-headless 17.0.1.u12-1
    OpenJDK Java 17 headless runtime environment
local/jre11 11.0.12-1
    Oracle Java 11 Runtime Environment LTS
local/jre11-openjdk 11.0.13.u8-1
    OpenJDK Java 11 full runtime environment
local/jre11-openjdk-headless 11.0.13.u8-1
    OpenJDK Java 11 headless runtime environment
local/jre8-openjdk 8.u292-1
    OpenJDK Java 8 full runtime environment
local/jre8-openjdk-headless 8.u292-1
    OpenJDK Java 8 headless runtime environment
$ archlinux-java status
  java-11-jdk
  java-11-openjdk
  java-17-openjdk (default)
  java-8-jdk
  java-8-openjdk/jre
Description:

I have multiple java-runtime available on my system, and when I want to upgrade a package that depends on jre > 16 I get an error in the dependency check which I do not think is correct. This was triggered by the jabref package for me.

This seem to only happen when I run pikaur -Syu, if I do pikaur -S jabref it builds&installs as expected.

Attached log:

pikayr_Syu_jabref.log

pikaur -Syu --verbose --pikaur-debug
...
:: error: Can't resolve dependencies for AUR package 'jabref':
Version mismatch:
jabref depends on: 'java-runtime>=16'
 found in 'PackageSource.AUR': '8u311-1'

Eothred avatar Dec 31 '21 07:12 Eothred

thanks for reporting! but unfortunately so far i can't figure it out at which point things getting wrong, i'll try to look into it once again later

actionless avatar Jan 12 '22 11:01 actionless

i believe that might be because another package during your sysupgrade is also depends on java-runtime-common and it somehow confusing dependency resolution system for aur packages, or because jdk is also included in the update

actionless avatar Jan 12 '22 11:01 actionless

Yes if I remember well jdk itself was also part of the upgrade list

Eothred avatar Jan 14 '22 10:01 Eothred

Can definitely confirm it is related to jdk also being part of the update, hit the issue again and updated jdk11/jre11/jdk8 first. Then there was no issue. Will update description

Eothred avatar Jan 20 '22 08:01 Eothred