Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repoctl down "pkgbase" errors if the pkgbase is not available in pkgname=() #69

Open
dr460nf1r3 opened this issue May 14, 2022 · 7 comments
Assignees
Labels
enhancement this could improve the capabilities/design of the program

Comments

@dr460nf1r3
Copy link

Currently, repoctl down does not work with pkgbase when it is not available in the pkgname array. An example of this is the yaru pkgbase.

λ repoctl down yaru
Error: package "yaru" could not be found on AUR

Meanwhile, the pkgbase can still be downloaded by its git URL (https://aur.archlinux.org/pkgbase/yaru)

@cassava
Copy link
Owner

cassava commented Feb 27, 2023

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.

@cassava
Copy link
Owner

cassava commented Feb 27, 2023

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.

@cassava
Copy link
Owner

cassava commented Feb 27, 2023

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.

@cassava cassava added the enhancement this could improve the capabilities/design of the program label Feb 27, 2023
@cassava cassava self-assigned this Feb 27, 2023
@cassava
Copy link
Owner

cassava commented Feb 27, 2023

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.

@dr460nf1r3
Copy link
Author

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

@cassava
Copy link
Owner

cassava commented Mar 21, 2024

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.

@dr460nf1r3
Copy link
Author

nico@temeraire ~> repoctl down firefox-esr
Downloading: firefox-esr

Seems to work running the latest version 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement this could improve the capabilities/design of the program
Projects
None yet
Development

No branches or pull requests

2 participants