How do you manage -git AUR packages?
I try to avoid -git packages, preferring those with actual versions, but it is not always possible. What strategies do people use to update -git packages?
I have thought about writing a small bash script that takes the output of pacman -Qsq '\-git' and rebuilds every package weekly or so. Is there a better option? I expect other people have solved this problem already.
About this post
- Posted
- Archived
- Score
- 16 · 100% up
- Kind
- Text
- ID
- a030v7
22 comments
-git packages have a dynamic pkgver. This means they can see if the pkgver has changed and know when they need to update and when not to.
This means you can update the package manually/with a helper/with a script and makepkg will skip over the already up to date ones.
It's just on you on what solution to go with and how often to check.
I just have yay do it for me (and pacaur before that), but I don't have enough
-gitpackages where the number of rebuilds is a problem.At some point, I was using
aurutilsandaurtoto automate rebuilds on my server (then just use it as a repo locally), but I abandoned it.I've been using aurutils to deal with them just like any other package.
I tried using aurutils for a bit, but it seemed like such a complicated solution to aur package management in general. Why do you personally use it?
There's nothing complicated about it, it simply lacks those few last layers of abstraction that allow people to use helpers without enabling Brain 1.0. This in turn allows you to easily adapt or extend aurutils to your own needs, unlike the monolithic helpers/pacman wrappers.
It's not really complicated once you have it set up, It just requires a few more steps initially like creating a local repository configuration.
I like the idea of building everything in a clean chroot which is part of the reason I use it. I also think the developer really knows his stuff and feel like he is likely going to be following best practices in Arch due to his position in the community.
I also think it ends up being a way to use packages which is more natural to Arch. Rather than building things and installing them with
-U, you end up having them as packages in your local repository, and can treat them as if they are the same as the packages from Arch main.yay(after runningyay --gendbandyay --devel --saveonce)Just know that
--savejust writes out the flags you've set to the config file. You don't have to use--saveunless you want to change the default flag set (and I personally do it by editing the config directly to see what the options are).that's the whole point of
--savehere, so I can just typeyayinstead ofyay -Syu --develevery time.I use pacvcs (disclaimer: I am the author), to check any git packages against their remote versions. It is available in the AUR. It is just a versions checker, you are responsible for updating the packages as you see fit.
Pacvcs looks for any package that ends it -git, and checks against the package URL. In some cases where the original PKGBUILD puts like a landing page as the package website address instead of the git repo they have in the sources array, I make sure to edit while I’m installing to have the git repo always be the website. That’s how pacvcs knows what remote to check against
Think this solution is kind of flawed. You grep the URL from the package but the URL is often the homepage, not the repo itself. It means you're going to end up with a pretty high miss rate.
This approach also does not account for branches. If I'm using foo-branch2-git, your tool will always be looking at master and and prompt to update when there is none.
Another thing is the hardcoded --foreign. This locks off all people who store AUR packages in a local repo.
Also I'm kind of confused as to why you have
systems="cvs|svn|hg|bzr|git"When it appears only git and bzrr are actually supported.The aur api does return time of last modification.
So you could call commits from the github api using the last modification time as your ?since= parameter, just count the length of the dictionary you get back to figure out how many new upstream commits there are.
I view an edit all PKGBUILDs on install (a good practice in general). If I see the URL is a homepage, I edit it to be the VCS source URL. I thought I said that already. It’s not perfect, but it works for me. As long as that happens, it doesn’t miss any.
You’re right about the foreign flag though.
The other vcs things to grep for, is really just looking for future support. In case this took off, people actually used it, and people actually installed things using those vcs packages. None of that has come to pass yet.
Trizen - sua - - devel - - needed
I think -git packages are a poor idea and just avoid using them.
There's not really a good way to do it. As far as I'm aware, there's no AUR helper that downloads the package and only performs the pkgver check. You just have to rebuild them occasionally. I use aur sync from aurutils, and keep my AUR packages in a local repo called "aur".