archlinux-downgrade / downgrade

Downgrade packages in Arch Linux
GNU General Public License v2.0
570 stars 24 forks source link

Add documentation for AUR package downgrading #223

Open KAGEYAM4 opened 7 months ago

KAGEYAM4 commented 7 months ago

:rocket: Feature Request

Checklist

Background

I tried downgrading packages which i got from AUR using yay which are caches in ~/.cace/yay but downgrading failed - No results found

Proposed feature

Add support for downgrading AUR packages by using yay/paru cached packages.

atreyasha commented 7 months ago

Does it work with this?

# downgrade --pacman-cache ~/.cache/yay --maxdepth 2 <aur_pkg>

You can set these options persistently in /etc/xdg/downgrade/downgrade.conf and specify the --pacman-cache option multiple times to cover both standard and AUR cache locations, eg. --pacman-cache /var/cache/pacman/pkg --pacman-cache /home/<user>/.cache/yay.

KAGEYAM4 commented 7 months ago

Does it work with this?

# downgrade --pacman-cache ~/.cache/yay --maxdepth 2 <aur_pkg>

You can set these options persistently in /etc/xdg/downgrade/downgrade.conf and specify the --pacman-cache option multiple times to cover both standard and AUR cache locations, eg. --pacman-cache /var/cache/pacman/pkg --pacman-cache ~/.cache/yay.

Yuup this works, thank you.

Maybe add this to readme.

KAGEYAM4 commented 7 months ago

i will keep it open, so that you can track it for the documentation PR.

Also, can we use shell variable in the .conf file like - --pacman-cache /home/${USER}/.cache/yay ?

atreyasha commented 7 months ago

i will keep it open, so that you can track it for the documentation PR.

Thanks!

Also, can we use shell variable in the .conf file like - --pacman-cache /home/${USER}/.cache/yay ?

Unfortunately that does not work in the configuration file, as downgrade is run as root and does not have knowledge of the non-root user during execution. So it would have to be the full (expanded) path.

Edit: Also we deliberately disable evaluations in the configuration file for security reasons.