moson-mo / pacseek

A terminal user interface for searching and installing Arch Linux packages
MIT License
348 stars 9 forks source link

configuration only makes sense with pacman wrappers #4

Closed AladW closed 2 years ago

AladW commented 2 years ago

The current install, upgrade commands assume a pacman wrapper that handles both AUR and repository packages. This limits the usefulness to people who choose not to use pacman wrappers. An alternative would be:

moson-mo commented 2 years ago

Hi @AladW

Thanks for the feedback.

The current install, upgrade commands assume a pacman wrapper that handles both AUR and repository packages.

That is correct assuming you use the default settings.

You can disable the AUR lookup and replace the install / remove / update command in the settings with e.g. sudo pacman -S, etc...

AladW commented 2 years ago

Yes, but then I can't install or upgrade AUR packages from the interface (or even view them, if the AUR lookup is disabled?), which seems useful.

Note that additional AUR install/upgrade commands in the configuration could default to the value of the install/upgrade commands, when left blank. That way there's no redundancy for users of pacman wrappers.

moson-mo commented 2 years ago

Yes, right. I'm actually assuming that an AUR helper is being used which delegates the installation to pacman in case of a repo package. Like yay or paru does.

But I see your point, in case an AUR helper is not being used you'd need separate methods/commands to handle both cases. I'll think about it. I'll try to keep things as simple as possible, but your suggestion makes sense.

For the install command, there would be a workaround though by just calling a shell-script which evaluates the output of something like pacman -Ss "^$1\$" to determine if the package is available in a repo and then use different commands to handle the installation.

moson-mo commented 2 years ago

I've added some config options for separate commands.

image

image

If a package originates from the AUR and "Use separate commands for AUR packages" is enabled, it'll execute the respective commands. The input fields in settings are only visible when that option is enabled.

AladW commented 2 years ago

Perfect, thanks for the quick follow-up.

AladW commented 2 years ago

Yes, but then I can't install or upgrade AUR packages from the interface (or even view them, if the AUR lookup is disabled?), which seems useful.

Note that additional AUR install/upgrade commands in the configuration could default to the value of the install/upgrade commands, when left blank. That way there's no redundancy for users of pacman wrappers.

On Wed, 06 Apr 2022 11:47:24 -0700 moson-mo @.***> wrote:

Hi @AladW

Thanks for the feedback.

The current install, upgrade commands assume a pacman wrapper that handles both AUR and repository packages.

That is correct assuming you use the default settings.

You can disable the AUR lookup and replace the install / remove / update command in the settings with e.g. sudo pacman -S, etc...

-- Reply to this email directly or view it on GitHub: https://github.com/moson-mo/pacseek/issues/4#issuecomment-1090616009 You are receiving this because you were mentioned.

Message ID: @.***>

-- alad @.***>