FS#72839 - Support Programmable provides/conflicts arrays

Attached to Project: Pacman
Opened by Mazhar Hussain (mazharhussain) - Thursday, 25 November 2021, 12:38 GMT
Last edited by morganamilo (morganamilo) - Thursday, 25 November 2021, 15:34 GMT
Task Type Feature Request
Category makepkg
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 6.0.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Reason:
Software like gtksourceview have Arch packages named gtksourceview5 but when creating VCS PKGBUILD for such a package from their gitlab repo, we do not know if gtksourceview we get is going to be version 5.2.x, 5.3.x, 6.x.x or something else. We need a way to determine the version of the source we get and then add it to `provides` array. So that other packages can depend on correct version of this package.

Solution:
Provide support for functions like provides() and conflicts() that run **after** downloading sources and either modify the actual provides/conflicts arrays or the print out a space separated list of provided/conflicting features/software.

My Specific Use-case:
I want to create an AUR package named gtksourceview-git which provides the latest gtksourceview (currently v5.3.0) i.e. `provides=(gtksourceview5=5.3.0)` because the latest version of gnome-text-editor-git needs gtksourceview5>=5.3.0.
But I also want it to update its provides array to `provides=(gtksourceview5=5.4.0)` when version info gets updated in master branch of gtksourceview without me having to manually edit its PKGBUILD (because its a VCS PKGBUILD which should always provide up-to-date information & software).
A PKGBUILD for gtksourceview-git is attached to this task.
This task depends upon

Closed by  morganamilo (morganamilo)
Thursday, 25 November 2021, 15:34 GMT
Reason for closing:  Won't implement
Comment by Mazhar Hussain (mazharhussain) - Thursday, 25 November 2021, 12:42 GMT
Sorry for not providing PKGBUILD along with the task. I forgot to do so but here it is.
   PKGBUILD (1.3 KiB)
Comment by morganamilo (morganamilo) - Thursday, 25 November 2021, 13:03 GMT
What's wrong with just setting these in package()?
Comment by Mazhar Hussain (mazharhussain) - Thursday, 25 November 2021, 13:41 GMT
I didn't know I could do that. Thanks for the tip.
Should I close this task now?
Comment by Mazhar Hussain (mazharhussain) - Thursday, 25 November 2021, 15:02 GMT
I didn't know I could do that. Thanks for the tip.
Should I close this task now?

Loading...