Jguer / yay

Yet another Yogurt - An AUR Helper written in Go
GNU General Public License v3.0
10.89k stars 355 forks source link

Feature Request: Install old package from the archive #1438

Open solonovamax opened 3 years ago

solonovamax commented 3 years ago

Is your feature request related to a problem? Please describe.

There have been a few times I've had to go and install an older package from the Arch Linux Archive because something broke in the dependency chain. (Like just today when I had to downgrade curl because for some reason that broke danvinci resolve. I don't know either.) Additionally, one might also want to install packages older than a few years (why?) from the Arch Linux Historical Archive. (Perhaps make it so in order for it to install packages from the historical archive, you need to enable some setting. Just because most people probably shouldn't be installing from it.)

Describe the solution you'd like

Anyways, it'd be nice if you could:

  1. List the previous versions of a package
  2. install a previous version of a package

You'd just apply a simple switch (-a doesn't seem to be used) to the -S, -Q, and -U operations:

Versions would be specified with the syntax that pacman already uses, which is [package]=[version], so curl=7.73.0-1 for example.

Adding on the s flag to either -S or -Q (along with the a flag) would search their respective locations for packages and list all the previous versions. (Or perhaps if there are too many versions, it would limit itself to the most recent 10.)

Describe alternatives you've considered

Alternatively, you guys could just go "naahhh" and everyone would just have to keep manually browsing through the archive and installing via the URL. It's not that big of a deal, but it'd be a cool QOL addition. This could very easily be considered well out of the scope of yay, so I'd completely understand if you guys decided to reject it for either being too complex or being out of scope.

Jguer commented 3 years ago

You are right, it's a cool QOL addition. -a is already used for AUR mode

I hesitate implementing it into -S as it is unsupported to do partial updates and partial downgrades.

Adding it to -Q is a bit hard and out of place

I'd add a yay -U helper so as to automatically fetch the archive link ex: yay -U curl=7.73.0-1 would automatically translate to a archlinux archive link

what do you think @solonovamax ?

solonovamax commented 3 years ago

I think that'd work pretty nicely. Just drop it somewhere in the man page and then I'd say you're good to go.

Though, there should definitely be a way to list the remote package versions that you can downgrade to, that way you don't have to go on the package archive to list the versions, basically defeating the purpose of it.

SalahAdDin commented 1 year ago

Is it available now?

HLFH commented 1 year ago

I am maintaining on the AUR the package agetpkg-git that does some part of the job by the way. https://aur.archlinux.org/packages/agetpkg-git

Carlosgrr commented 1 month ago

I just would like to reiterate that this feature is needed, I am trying to install zfs-linux and it depends on an older version of the kernel, the devs almost never are on the latest version, just the possibility of having yay searching the archive for the older packages for me would be awesome, if it noticed the older package not being present during the default procedure, and prompting me just to confirm that the archived version would be installed, would be the icing on top.

SalahAdDin commented 1 month ago

I just would like to reiterate that this feature is needed, I am trying to install zfs-linux and it depends on an older version of the kernel, the devs almost never are on the latest version, just the possibility of having yay searching the archive for the older packages for me would be awesome, if it noticed the older package not being present during the default procedure, and prompting me just to confirm that the archived version would be installed, would be the icing on top.

I agree, it has been a long time without this feat or a response to this issue.