You are not logged in.

#1 2024-04-02 17:28:50

priorit
Member
Registered: 2008-12-23
Posts: 21

[SOLVED] Optional dependency that must match version number

How do I declare that a package depends on another package, but both must match version?

Concretely, I have the Toit language package which optionally depends on binary vessels which can be installed to support cross-compilation support.

Both packages are always updated at the same time and must match version number. Specifically, the 'toit' executable can only use vessels that have been built for the same version.

At the moment the 'toit' package has the following optional dependency:

optdepends=("toit-vessels-bin=$pkgver: Vessels for cross-compilation")

and the vessels package has:

depends=("toit=$pkgver")

However, this doesn't work (at least not with 'yay'), as both block each other from upgrading. I have to manually uninstall one of them; then upgrade the remaining one, and then only installed the second one again.

What's the best way to implement this?

Last edited by priorit (2024-04-02 17:49:14)

Offline

#2 2024-04-02 17:39:27

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,045

Re: [SOLVED] Optional dependency that must match version number

That is how you do it, the problem is yay. Versioned deps in general don't work well in the AUR.

Offline

#3 2024-04-02 17:48:42

priorit
Member
Registered: 2008-12-23
Posts: 21

Re: [SOLVED] Optional dependency that must match version number

Thanks. Following your feedback I went to yay's issue tracker and found the following bug: https://github.com/Jguer/yay/issues/1449
I think it covers my case.

Offline

#4 2024-04-02 18:23:59

Trilby
Banned
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] Optional dependency that must match version number

There's no need to uninstall anything (other than yay ... you really should).

Just build both packages, then install both of them as arguments to pacman -U.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2024-04-02 20:11:31

priorit
Member
Registered: 2008-12-23
Posts: 21

Re: [SOLVED] Optional dependency that must match version number

Trilby wrote:

There's no need to uninstall anything (other than yay ... you really should).


I'm open to switching to something else. What's the best way to make sure that my AUR packages stay up to date?

Offline

#6 2024-04-03 11:06:40

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,885

Re: [SOLVED] Optional dependency that must match version number

Verify 'Notify of package updates' is selected in your aur account settings (it's near the bottom of the page) .

While logged in to aur , goto the aur page for a package you use and 'enable notifications' .


That will ensure you get an email when that package has been updated by the maintainer.


Note that this method often doesn't work well for VCS packages (name ends with -git and some others) as they can go for years without needing updates.
For VCS packages you should setup some kind of schedule to update them.


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

Board footer

Powered by FluxBB