You are not logged in.
Hi!
I'm trying to create a PKGBUILD for a package that depends on any version of java-runtime between 8 and 11 (not 7 and not 13, but anything in between). According the wiki (https://wiki.archlinux.org/index.php/PKGBUILD), I should be able to restrict the version of a package by using something like:
depends=('foobar>=1.8.0' 'foobar<2.0.0')
So I tried to do this:
depends=('java-runtime>7' 'java-runtime<13')
But it appears to ignore the second restriction, as it offers me to install version 13. Am I doing something wrong?
Thanks for your time.
Offline
The dependencies are evaluated independently
==> Checking runtime dependencies...
==> Installing missing dependencies...
:: There are 4 providers available for java-runtime>7:
:: Repository extra
1) jre-openjdk 2) jre10-openjdk 3) jre11-openjdk 4) jre8-openjdk
Enter a number (default=1): 2
:: There are 4 providers available for java-runtime<13:
:: Repository extra
1) jre10-openjdk 2) jre11-openjdk 3) jre7-openjdk 4) jre8-openjdk
Enter a number (default=1): 1
I believe the best you can achieve is to document the package is for java 8-11 and if the package supplies a binary do something similar to https://git.archlinux.org/svntogit/comm … ges/pdfsam
Offline
Actually, the application provides its own version of java, but I'm trying to avoid using that in favor of using the java-runtime provided by Arch's official repository. I'm thinking about sticking to version 11 of java (since it's the latest one that works) and replacing the original launcher (inside $pkgdir/usr/bin) with a wrapper that locally changes the default PATH of java (as suggested here: https://wiki.archlinux.org/index.php/ja … a_version).
Offline
Often splitting those conditions can be used to workaround these issues.
Try
depends+=('java-runtime>=8')
conflicts+=('java-runtime>13')
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline