2018-03-21 8:56 GMT+08:00 Eli Schwartz <eschwartz@archlinux.org>:
On 03/20/2018 08:47 PM, 尤立宇 wrote:
I vote for a new search type "providers". For my use case, I'd appreciate if I can get precise information from the RPC, instead of parsing the aurweb html or crawling the entire AUR. I prefer having a bulk query here so I can keep the request count low.
So, like, return all the provides results in one search result, then do another RPC search for multiinfo on all those packages to see exact details on the pkgbase, provides, etc?
I think it would be like: HTTP GET /rpc/?v=5&type=provides&arg[]=java-environment&arg[]=libgala.so {"version":5,"type":"provides","resultcount":2,"results": "java-environment": [] // might be list of package names or list of "info" "libgala.so": [] }
pacman -Ss will show them, pacman -S will install them, so the web interfaces arguably should do the same.
Actually I just found it confusing that: pacman -Ss 'gcc>7' shows nothing, yet pacman -S 'gcc>7' will do the right stuff I'd argue that pacman should provide a search providers. But at least it has alpm_find_satisifier.
That's because the >7 is a version specifier, not a search term. On top of which that is for the main package and has nothing to do with provides. I got the reasoning about it. Still, versioned dependencies are valid in the depends array, so I'd like the provides search in the RPC mentioned above support this, much like the Dependencies section in the web interface [1].
[1] https://aur.archlinux.org/packages/nvidia-ck/ See how it lists nvidia-utils=390.42, linux-ck-headers>=4.15, etc