Versioned dependencies are useless if the package providing them doesn't declare itself as `provides=(PKG=VERSION)` -- `pacman` doesn't know what version to read `provides=(PKG)` as implying and gives up immediately.
However, in some cases this version is (apparently) easy to guess. For example, with variants of established packages, `$pkgver` is often the correct version to use (cf eg `hledger` [extra/hledger],[aur/hledger],[aur/hledger-git]). For VCS packages using the wiki-recommended `pkgver=$basever.r$commitCount.g$hash`, `$basever` appears to be the correct version. (cf eg `pandoc` [aur/pandoc], [aur/pandoc-crossref]).
[extra/hledger]: https://archlinux.org/packages/extra/x86_64/hledger/
[aur/hledger]: https://aur.archlinux.org/packages/hledger-bin
[aur/hledger-git]: https://aur.archlinux.org/packages/hledger-git
[aur/pandoc]: https://aur.archlinux.org/packages/pandoc-static-git
[aur/pandoc-crossref]: https://aur.archlinux.org/packages/pandoc-crossref-static-git
The one problem I can foresee is if eg the upstream project renamed and changed versioning schemes, so that a package might need to `provides` differing versions. However, in that case the version should be given explicitly anyway.
This has personally annoyed me in packaging [aur/pandoc] and [aur/pandoc-crossref], but I let it slide as a personal issue. Now I have [a user making such a request](https://aur.archlinux.org/packages/hledger-bin#comment-1007528), I thought I'd raise the idea.f
↧