How to deal updates for AUR -git PKGBUILDS

I was using my own script to update and build certain libraries I was using but I’ve decided it’s probably easier to use the AUR PKBUILD. This PKGBUILD has a few other AUR PKGBUILD dependencies which are -git builds. From my understanding these builds pull in the latest commit and builds that, the PKGBUILDS of these don’t change very often.

So my question is what’s the best way to deal with these -git PKGBUILDS when it comes to updating? Is it best to just rebuild them every now and then with paru --rebuild library-git or is there a better way of handling updates for these PKGBUILDS?

I update them once a week with:

yay -Syu --devel

Usually on a Sunday.

–devel
During sysupgrade also check AUR development packages for updates. Currently only Git packages are supported.

Does this mean if it finds the branch was updated it will pull in new updates and rebuild the -git PKGBUILDS, because when I run paru -Syu --devel now it say it has nothing to do?

I updated 45 minutes ago, and it worked then:

yay -Syyu --devel --noconfirm
:: Synchronising package databases...
 cachyos-v3                                        161.8 KiB  1818 KiB/s 00:00 [---------------------------------------------] 100%
 cachyos-core-v3                                    98.4 KiB  1058 KiB/s 00:00 [---------------------------------------------] 100%
 cachyos-extra-v3                                    2.2 MiB  10.1 MiB/s 00:00 [---------------------------------------------] 100%
 cachyos                                           504.4 KiB  1910 KiB/s 00:00 [---------------------------------------------] 100%
 endeavouros                                        15.1 KiB   148 KiB/s 00:00 [---------------------------------------------] 100%
 core                                              116.2 KiB  89.6 KiB/s 00:01 [---------------------------------------------] 100%
 extra                                               7.8 MiB  3.65 MiB/s 00:02 [---------------------------------------------] 100%
 multilib                                          135.0 KiB   100 KiB/s 00:01 [---------------------------------------------] 100%
 archlinuxcn                                      1380.7 KiB  5.37 MiB/s 00:00 [---------------------------------------------] 100%
 chaotic-aur                                       628.6 KiB  1173 KiB/s 00:01 [---------------------------------------------] 100%
error: failed retrieving file 'chaotic-aur.db' from cdn-mirror.chaotic.cx : The requested URL returned error: 404
:: Searching AUR for updates...
:: Checking development packages...
:: Searching databases for updates...
 -> dxvk-mingw-git: local (2.6.1.r289.g6b16ece15-1) is newer than cachyos (2.6.1.r185.g5d463db94-1)
 -> eww: local (0.6.0-1.3) is newer than archlinuxcn (0.6.0-1)
 -> grimblast-git: local (r129.910dad4-1) is newer than cachyos (r89.fe26a90-1)
 -> heroic-games-launcher-bin: local (3:2.17.1-1) is newer than cachyos (2.17.2-1)
 -> nodejs: local (24.1.0-2) is newer than cachyos-v3 (23.11.0-2)
 -> qt-sudo: local (2.0.1-1.4) is newer than cachyos (2.0.1-1)
 -> reflector-simple: local (2024.8.1-1) is newer than cachyos (3.3-1)
 -> Packages not in AUR: indicator-kdeconnect-git
 -> Orphan (unmaintained) AUR Packages: gimp-plugin-arrow  opera-beta-ffmpeg-codecs  smenu-git  termpdf.py-git
 -> Flagged Out Of Date AUR Packages: termpdf.py-git
 -> python-pagelabels: local (1.2.1-1) is newer than AUR (1.2.0-1)
 -> wttr: local (1.55.r0.g36893b1-1) is newer than AUR (1.55-2)
:: 2 dependencies will also be installed for this operation.
   cachyos-extra-v3/just   -> 1.40.0-1.2
   (make dependency of hyprls-git)
   extra/meson-python      -> 0.18.0-1
   (make dependency of python-ignis-git)

:: 13 packages to upgrade/install.
13  extra/hdf5                         1.14.6-4.1             -> 1.14.6-5
12  extra/libwacom                     2.16.0-2               -> 2.16.1-1
11  extra/mtools                       1:4.0.48-1.2           -> 1:4.0.49-1
10  archlinuxcn/firefox-nightly-en-us  141.0a1.20250616.00-1  -> 141.0a1.20250616.12-1
 9  archlinuxcn/hyprland-git           0.49.0.r96.bd5703d5c-1 -> 0.49.0.r98.d4e8a4408-1
 8  chaotic-aur/ironbar-git            0.16.1.r348.g4fad5a4-1 -> 0.16.1.r362.g326c036-1
 7  chaotic-aur/rustup-git             1.28.2.r71.gb892b560-1 -> 1.28.2.r74.gbd354c14-1
 6  aur/sherlock-launcher-bin          0.1.12-1               -> 0.1.13-2
 5  devel/espanso-wayland-git          2.2.3.r26.g39594e9d-1  -> latest-commit
 4  devel/flameshot-git                r2057.58afdce7-1       -> latest-commit
 3  devel/hyprls-git                   0.7.0-1                -> latest-commit
 2  devel/python-ignis-git             0.5.r83.g4679c9a-1     -> latest-commit
 1  devel/treesheets-git               r1056.a8618c6-1        -> latest-commit
==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
 -> Excluding packages may cause partial upgrades and break systems
==>
1 Like

I think I missed a part in the manual.

–devel
During sysupgrade also check AUR development packages for updates. Currently only Git packages are supported.

Devel checking is done using git ls-remote. The newest commit hash is compared against the hash at install time. This allows devel updates to be checked almost instantly and not require the original PKGBUILD to be downloaded.

So the answer to that then would be yes.

Thanks for your help @xircon!

1 Like

Quick question, what processor do you have? (Related to CachyOS question I posted).

Ryzen 9 7900X

1 Like

Just wondered because of the different repos we had.

1 Like

I used the cachyos-repo.sh script to setup the CachyOS repos and it added the the v4 repos automatically for me. Quite odd that the v3 and v4 repos don’t seem to contain the same packages, you would think they would contain the same packages with just different cpu optimzations.

This looked handy @xircon, because I too use a number of -git packages and have to date manually updated them with something like:

yay -Q | grep git
yay -Syu somepackage-git somepackage-git somepackage-git

I ran the command you’d shared, anticipating a number of packages would need updating, but it returned:

there is nothing to do

Thinking that odd, I manually updated rawtherapee-git and sure enough, there were more recent commits to build against:

Package (1)      Old Version             New Version             Net Change

rawtherapee-git  1:5.12.r1.g6e2a2091d-1  1:5.12.r8.g9f9b6ede8-1    0.00 MiB

Total Installed Size:  122.00 MiB
Net Upgrade Size:        0.00 MiB

Perhaps I’ve misunderstood what --devel references?

2 Likes

By the way..
Paru uses the config to denote which suffixes are included with --devel as well as if --devel should be automatically included.

1 Like

Another reason why I like paru is because of having a config file. Reading the manul entry for --devel, it seems only git packages are supported now.

During sysupgrade also check AUR development packages for updates. Currently only Git packages are supported.

So what’s the advantage of adding more suffixes if only Git packages ares supported?

I take this to mean that the git format is the only thing supported in checking for upgrades/diffs (that is something hosted at gitlab, github, etc) .. the suffixes denotes package suffixes that may or may not align solely with -git.
While this would technically go against AUR packaging guidelines, an example may be something like -devel suffix for a package that is indeed a ‘git’ package.

1 Like

That makes sense, hadn’t thought of that.