aarnt / octopi

A powerful Pacman (Package Manager) front end using Qt libs
https://tintaescura.com/projects/octopi
GNU General Public License v2.0
581 stars 83 forks source link

Allow setting a custom command for AUR packages instead of manually adding support for AUR helpers #473

Open Tank-Missile opened 3 years ago

Tank-Missile commented 3 years ago

AUR helpers come and go. First I moved from pacaur to yay, and now I'm trying to figure out where to move to next now that yay is in maintenance mode. There are many AUR helpers even beyond what the wiki lists, and supporting all of them manually means not all helpers end up getting supported. Asking for a helper to be supported means waiting for the next release before it can be used with octopi. To alleviate this maintenance burden, why not toss out the old method of supporting AUR helpers and leave it up to the user? Environment variables could be used for supplying the AUR command with the list of packages to be installed, removed, upgraded, etc. Here's what the settings menu could look like:

Screenshot_20210204_132953

aarnt commented 3 years ago

Hi @Tank-Missile ,

I understand your point and it'd be cool if we could easily solve this. The problem is that it is not enough to specify the command that the helper uses to install packages. It needs also the command to check for outdated AUR packages and, the worst, the code to build the package list of searched packages.

You can take a look at https://github.com/aarnt/octopi/blob/1234d31bc6cfcfa24430b2e3bd096159e506b64d/src/package.cpp#L1083 to see what I'm talking about.

Morganamilo commented 3 years ago

I feel it would be a lot easier to just use the AUR RPC for this instead of relying on a helper.

aarnt commented 3 years ago

@Morganamilo

You mean this one: https://git.archlinux.org/aurweb.git/tree/doc/rpc.txt ?

Morganamilo commented 3 years ago

Yes, though you can find the rendered version of that link here: https://aur.archlinux.org/rpc

aarnt commented 3 years ago

Nice. So your idea is using RPC to search and get info and helper to install/update/show outdated pkgs?

Morganamilo commented 3 years ago

Yeah that's probably best. Use the RPC to get information, use the helper to actually do stuff.

aarnt commented 3 years ago

@Morganamilo Hmm, thanks. I'll take a look and make some tests.