Skip to content

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.

16 points22 comments
Open on Reddit
About this post
Posted
Archived
Score
16 · 100% up
Kind
Text
ID
a030v7

Author

1
posts
1
comments
0
media
View profile

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.

8 points

I just have yay do it for me (and pacaur before that), but I don't have enough -git packages where the number of rebuilds is a problem.

At some point, I was using aurutils and aurto to automate rebuilds on my server (then just use it as a repo locally), but I abandoned it.

6 points

I've been using aurutils to deal with them just like any other package.

3 points

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?

1 points

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.

5 points

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.

3 points

yay (after running yay --gendb and yay --devel --save once)

3 points

Just know that --save just writes out the flags you've set to the config file. You don't have to use --save unless you want to change the default flag set (and I personally do it by editing the config directly to see what the options are).

2 points

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

2 points

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.

1 points

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.

1 points

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.

1 points

I think -git packages are a poor idea and just avoid using them.

1 points

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".

aur sync --no-view --repo aur --no-ver-shallow --no-confirm $(pacman -Sl aur | awk  '{print $2}' | grep '\-git$' | sed ':a;N;$!ba;s/\n/ /g')
1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.