You are not logged in.
Package A is installed
Package B depends on A and needs to be set to the same version package A has.
pacman -Q somename | sed 's/somename //' Does remove the name but leaves the pkgrel value .
It's also not suitable to put directly in a string .
How to use the version of A in the pkgver() function of B ?
Last edited by Lone_Wolf (2023-05-14 09:06:07)
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
This sounds like a bad idea from the start. Why would the pgkver of B depend on A? It's then *not* the pkgver of B but something else entirely. A package's pkgver depends on it's own source. You can have versioned dependencies if you need the same versions installed, but having B misrepresent what version it is would not support this goal at all.
But if you really just want a sed command to extract the version number:
... | sed 's/[^ ]* \([^-]*\)-.*/\1/'Last edited by Trilby (2023-05-13 15:25:17)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
The AUR llvm-minimal-git package has been getting more complex and an increased number of splits for various reasons .
I am considering to switch it to separate packages (similar to llvm/clang in repos ) that will build from a specific snapshot of the sourcecode .
Puttting the snapshot in its own package seems like a simple way to ensure all use that exact version .
I could have all of them run the same pkgver() used in the snapshot package, but copying the value from the snapshot pacakge feels cleaner .
Your sed command does deliver the value.
Edit : getting the command output into a var was easy using a bashism.
Last edited by Lone_Wolf (2023-05-14 09:05:48)
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