Open AladW opened 6 years ago
Thanks for the suggestion, you're welcome to provide a patch ;)
Please make sure to leave the existing code for PKGBUILD and fall back to it in case of missing .SRCINFO file or if it doesn't have the field we're looking for.
PKGBUILD downloading and parsing is only done to get single arch
field (#121, #122) and is discarded right away, see aur.c#L798.
I think this is out-of-scope of what package-query should do and to be provided by tool that handles AUR packages not just queries RPCs e.g. by yaourt.
SRCINFO has a more stable format than PKGBUILD as it is a simple key/value format generated by the user. It contains the same metadata the PKGBUILD contains. (*) For example, compare:
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=aws-cli-git
to
https://aur.archlinux.org/cgit/aur.git/tree/.SRCINFO?h=aws-cli-git
(*) The SRCINFO has to be explicitely generated by the maintainer, but this shouldn't be a problem since the AUR warns explicitely on this when pushing changes.