Open dr460nf1r3 opened 2 years ago
Hi @dr460nf1r3, thanks for reporting this. I seem to have missed it when you initially reported it. I'll see if I can fix this quickly, but if its not trivial it may take a little longer.
Alright, the API I'm using is the Web RPC, as documented here: https://wiki.archlinux.org/title/Aurweb_RPC_interface
However, neither with the search
nor with the info
command am I actually able to get information on the package base. So dealing with this... is not easily feasible.
For comparison, the tool paru can't find yaru
either.
So what I could do when not being able to find a package via the Web RPC protocol is just try to download it using the expected URL. But I'm not sure how to correctly sanitize the input package names so that we don't make arbitrary HTTP calls.
Since this goes beyond what is available from the Web RPC, I'm going to call this an "enhancement" as opposed to a "bug". We can also see that in other tools, the same behavior is present.
Hey @cassava ! Thanks for taking a look at this issue - would using the git URL not be an option? I'm not really experienced with how the RPC protocol works, so bear with me. Anyways, we do have a workaround and it is not that much of an issue. <3
So I got around to looking into this again today, and I found that there are some new RPC endpoints available that I could use to not have to resort to magic.
Here is the overview of endpoints: https://aur.archlinux.org/rpc/swagger
And the endpoint of interest is suggest-basepkg
. I can use this to at least discover whether a base package exists at all. From there I'm still missing a lot of data, but maybe I can make do without.
nico@temeraire ~> repoctl down firefox-esr
Downloading: firefox-esr
Seems to work running the latest version 🤔
Currently,
repoctl down
does not work withpkgbase
when it is not available in thepkgname
array. An example of this is the yaru pkgbase.Meanwhile, the pkgbase can still be downloaded by its git URL (https://aur.archlinux.org/pkgbase/yaru)