Skip to content

Install specific version of an AUR package #1084

@arakis

Description

@arakis

Discussed in #1068

Originally posted by arakis November 8, 2023
I want to know how to install a specific version and/or branch/commit/tag.

I know ArchLinux is a Rolling Distribution and partial Updates are not allowed. That's why i'm using archive.archlinux.org.

There are two reasons why I need to specify a specific version (or commit):

a) If the AUR packages require a SPECIFIC installed dependency of the regular packages. Example: You stick with virtualbox 7.0.10 (using archive.archlinux.org), but the latest AUR virtualbox-ext-oracle is at 7.0.12. To work around this, instead of using paru, I'm using these commands:

cd ~/.cache/paru/clone/virtualbox-ext-oracle
git checkout 9184ed4abf39476502419f626e3da6980ccf53d2 #7.0.10
makepkg -si --noconfirm

b) avoid re-downloading packages/sources again. The reason is, once a month, I completely rebuild my arch linux from another running linux chroot via a large, well maintained script. This means, I wipe the whole file system except the arch package cache, and the paru cache and some important data directories. I can re-build as often I want, normally, there are no re-downloads. But when paru detects new version, it will force always the latest versions. In case of large binary packages, i there could be several gigabytes of data. FYI: I'm on cell connection only, and mostly I have horrible connection.

I have no problems to iterate the commits and check the PKGBUILD version until I find a specifc commit that matches that PKGBUILD file. But even if I have the matching commit, I have no way to tell paru to take that commit. Even if I checkout the commit manually (see my example above), paru will ignore this.

Of course, I could take makepkg alone without paru, but then I lose some dependency resolving features, like when an AUR packages requires another AUR package.

Summary

I kindly ask to add one of the following mechanisms:

  • Install with explicit version like paru -S package=version.
  • Install with explicit commit hash --> you checkout exactly that commit from AUR. Let's say paru -S package --commit-hash=<hash>
  • Let user manually checkout the repo (see above), and do NOT pull the latest PKGINFO, just take the repo as it it locally checked out. This method should work without any internet connection (if the repo is already cloned).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions