FS#63086 - [pacman] should satisfy $name>=$ver1 and $name<$ver2 by a single package

Attached to Project: Pacman
Opened by Erich Eckner (deepthought) - Wednesday, 03 July 2019, 14:01 GMT
Task Type Feature Request
Category General
Status Unconfirmed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 5.1.3
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 3
Private No

Details

Summary and Info:

If a dependency appears twice (with differing version requirements), it should be satisfied by a single package (which fulfills both version requirements).

Example:

java11-openjdk's PKGBUILD currently has makedepends=(... 'java-environment>=10' 'java-environment<12')

however, pacman may satisfy this dependency by installing jdk8-openjdk and jdk-openjdk (provides version 12). This is not what was intended by the PKGBUILD and the build breaks.

Another idea would be to allow some version range in the dependencies, however, I think it is inferior to this approach.

Steps to reproduce:
> pacman -Rs jdk9-openjdk jdk10-openjdk
> pacman -S jdk8-openjdk jdk-openjdk
> git checkout 60d2e75bfeae65345b5f31bdc9fcb590a525c380
> cd java11-openjdk/repos/extra-x86_64
> makepkg -fcrs
This task depends upon

Comment by Stephan S (buzo) - Wednesday, 10 July 2019, 16:12 GMT Comment by Chih-Hsuan Yen (yan12125) - Sunday, 19 January 2020, 13:51 GMT
As a side note, Xyne implmented a "collect-and-find" approach in XCPF, which correctly handles cases like `makedepends=('java-environment>=10' 'java-environment<12')`. Key functions are find_satisfiers_in_pkgs() and find_satisfiers_in_pkgs() in common.py [1].

[1] https://xyne.archlinux.ca/projects/python3-xcpf/src/
Comment by Chih-Hsuan Yen (yan12125) - Sunday, 19 January 2020, 13:54 GMT
Ah, this seems also a duplicate of https://bugs.archlinux.org/task/48252.

Loading...