Morganamilo / paru

Feature packed AUR helper
GNU General Public License v3.0
6.08k stars 232 forks source link

[feature request] let user pick commit to build #213

Closed greyltc closed 3 years ago

greyltc commented 3 years ago

What do you think about giving the user the option of picking the AUR package's commit hash to build from?

Let's consider https://aur.archlinux.org/packages/python-lmfit/

If I do paru -S python-lmfit, I get a package built from the latest AUR package state, that's commit hash 080c4d2

Would be cool if I could do paru -S python-lmfit --commit f7a661d to build from the one commit earlier package state like if the maintainer messed up the package or something.

Morganamilo commented 3 years ago

Issue with that is we can't rewind the AUR RPC. So version numbers and dependency resolution would still seem to be at the current version regardless of the supplied version.

Also with that specific aproch how would you handle multiple targets and depends?

I can see a --holdver flag existing that if something breaks it's on you.

greyltc commented 3 years ago

Sorry, I'm not familiar with exactly what's going on under the hood here with any AUR RPC. I figured you were building based solely on on the contents of the PKGBUILD/.SRCINFO that you fetch (and the files it comes with) so that it would be easy to just build a different revision of the git package repo by simply checking out/clonging a different commit.

Dependencies would just be to blindly use whatever that revision of the package repo says to use. Multiple targets would be illegal with --commit. Or if you wanted to get fancy, you could pair up --commit with the previous target specified so you could mix and match: paru -S python-lmfit --commit f7a661d python-typish builds and installs a specific commit of python-lmfit and the latest python-typish

Morganamilo commented 3 years ago

Yeah, the pkgbuild/srcinfo is not used at all for dependency resolution at all.

greyltc commented 3 years ago

I see. Sounds like this is not as easy to add support for as I thought it would be then! No worries! I assumed this was low hanging fruit.

Morganamilo commented 3 years ago

Also given most build systems do use multi core builds I'm not sure there's much of an advantage anyway.

Morganamilo commented 3 years ago

And wrong issue -_-

Morganamilo commented 3 years ago

Going to close unless there's a sufficiently good solution with a good use case.