You are not logged in.
Hi,
first of all. I wasn't quite sure if this goes into the category "Creating packages" or "AUR topics" as it's both So I'm sorry if I picked the wrong one.
So my problem is that I need a dependency with a minimum version and a maximum version. According to the wiki (https://wiki.archlinux.org/index.php/PKGBUILD#depends) , I can just do something like
```
depends=('nodejs>=12.14.1' 'nodejs<13')
```
So basically just listing both.
But it seems not to work well. First in the AUR it is displayed like:
nodejs<13 (nodejs6-bin, nodejs-ipv6, nodejs-git, nodejs-lts-dubnium, nodejs-lts-erbium, nodejs-lts-fermium)
nodejs>=12.14.1 (nodejs6-bin, nodejs-ipv6, nodejs-git, nodejs-lts-dubnium, nodejs-lts-erbium, nodejs-lts-fermium)
So it's then also listed as two seperate dependencies, which is confusing. Additionally the nodejs version aren't even correct. For example nodejs-lts-fermium > 13 and nodejs-lts-dubnium < 12.4.1 ... still it is listed in both.
But the worst problem is that makepkg actually only tries to resolve the first dependency -> 'nodejs < 13' and checks the other only later. So the user is asked, if he want to install dubnium or erbium. And if you select dubnium (which is < 12.4.1) the build crashes instantly.
So how can I achieve that both dependencies are treated as one, so they are correctly displayed in the AUR and most important makepkg only offers nodejs versions matching both requirements (which is currently just erbium).
Thanks!
Last edited by Leon0402 (2020-11-28 09:42:34)
Offline
The AUR website doesn't check versions on deps. What you're doing is correct, you can't specify them in one dep. What are you seeing exactly with makepkg?
Offline
A workaround i've seen often for this is to combine conflicts and depends / makedepends .
Try something like this :
depends=('nodejs>=12.14.1' )
conflicts=('nodejs>=13')
Last edited by Lone_Wolf (2020-11-28 14:42:26)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
The AUR website doesn't check versions on deps. What you're doing is correct, you can't specify them in one dep. What are you seeing exactly with makepkg?
:: There are two canidates for nodejs<13:
:: Repositorium community
1) nodejs-lts-dubnium 2) nodejs-lts-erbium
> 1
==> Error: Could not solve all dependencies
I just translated it, so it might not be accurate. But basically it asks me whether I want dubnium or erbium as both are candidates for <13. Then I select dubnium (which is also the default value) and it fails, because the dependency nodejs >= 12.14.1 is not solved with dubnium.
If that's actually expected behaviour and can only be solved with some hacky workarounds, then this is a huge issue with makepkg imo.
@Lone_Wolf Thanks for the suggestion! I suppose I will use this or just hardcode node-js-erbium (as this is the only version, which currently works anyway ... ). But this seems like quite an essential missing feature then to me.
Offline