FS#57230 - Ability to query pkgbase via AurJson
Attached to Project:
AUR web interface
Opened by Alad Wenter (Alad) - Thursday, 25 January 2018, 21:42 GMT
Opened by Alad Wenter (Alad) - Thursday, 25 January 2018, 21:42 GMT
|
Details
As of aurweb 4.6.0, only packages can be queried via the
RPC, and not package bases. "virtualfish" [1] for
example:
# virtualfish (multiinfo query) { "version": 5, "type": "multiinfo", "resultcount": 0, "results": [] } # python-virtualfish (multiinfo query) { "version": 5, "type": "multiinfo", "resultcount": 1, "results": [ { "ID": 446208, "Name": "python-virtualfish", "PackageBaseID": 125823, "PackageBase": "virtualfish", "Version": "1.0.5-5", "Description": "A virtualenv wrapper for the Fish shell", "URL": "https://github.com/adambrenecki/virtualfish", "NumVotes": 1, "Popularity": 0.348799, "OutOfDate": null, "Maintainer": "XenGi", "FirstSubmitted": 1506266254, "LastModified": 1506266254, "URLPath": "/cgit/aur.git/snapshot/virtualfish.tar.gz", "Depends": [ "python-virtualenv", "python-setuptools" ], "License": [ "MIT" ], "Keywords": [] } ] } A particular use case is that make/depends may (and should) be listed globally for split packages, see PKGBUILD(5): [2] "Note that makepkg does not consider split package depends when checking if dependencies are installed before package building and with --syncdeps. All packages required to make the package are required to be specified in the global depends and makedepends arrays." Thus if these global make/depends are not duplicated in the split packages, there's no way to retrieve them from the RPC as with other make/depends. [1] https://aur.archlinux.org/packages/?O=0&K=virtualfish [2] https://www.archlinux.org/pacman/PKGBUILD.5.html#_package_splitting |
This task depends upon
That specific package, seems to have a bug whereby the global depends are abused as makedepends, then overwritten when running package_*()
The PKGBUILD should be fixed, and the AurJson should not be modified for use cases which only ever affect badly written PKGBUILDs.
That's just the definition, not badly written PKGBUILDs, and you can't retrieve these global depends from the RPC as it stands.
In any event this is just an example - pkgbase is available from the web interface so it makes sense it's available from the RPC too.
Question is, should we then only offer the same information available on https://aur.archlinux.org/pkgbase/virtualfish which basically boils down to the PackageBase*, list of split packages, and information associated with the aurweb record itself like: maintainer and git repo information, votes, keywords. Or maybe expand the pkgbase page.
EDIT: Right.
Except, I do feel that any split PKGBUILD which is overwriting a global depends=() is doing it wrong. ;) Appending, maybe... but then the package/ page will anyways list everything actually needed for makepkg, while not including things which are required by the other split package as runtime-only depends.
OTOH runtime depends on a split package page are not necessarily needed for the build at all, then.
...
I think any solution should apply both to the web interface and the RPC.