You are not logged in.

#1 2016-01-08 12:59:16

binaryplease
Member
Registered: 2012-04-11
Posts: 16

Upgrading -git packages from aur

Hello,

what is the best practice to update -git packages installed from aur?
I searched google and found the tip to use:

yaourt -Syua --devel

but the --devel flag doesn't seem to be working, as git packages don't get updated.
yaourt shows the packages that have new versions in git in red (screenshot: https://imgur.com/jPBo7bg) though.

Thanks.

Offline

#2 2016-01-08 13:29:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: Upgrading -git packages from aur

There is no way for any tool to know when vcs packages should be updated without first retrieving, parsing, and running some of the PKGBUILDs.  So either keep track of upstream yourself, and rebuild whenever you want to, or `makepkg -od` to get the source and run the prepare function.  Then you can check the version in the PKGBUILD against what you have installed to see if you want to update.

Something like the following could work: run it in the directory with the PKGBUILD.  Or run it within a loop that downloads each PKGBUILD for each of your aur packages.

#!/bin/bash

makepkg -od
source PKGBUILD
[[ $pkgver > $(pacman -Q $pkgname | awk '//{print $2;}') ]] && makepkg -esi

This is, essentially, what aur helpers would have to do to check.

I prefer a much more pragmatic approach.  Most git projects develop fast enough that I'll never be updating as often as commits are pushed (some are daily, or many times per day).  So if I want the most up to date git version, I rebuild.  Period.  There is no point having all the scripting logic above to check whether there is a newer version available when in every case the following script would be just as accurate:

echo yes

Other git projects tend to get commits pushed at very rare intervals, and I'll tend to hear about it when there was activity.  So I update these when I hear of some interesting changes (or on occasion due to an ABI change).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2016-01-08 15:24:13

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,090

Re: Upgrading -git packages from aur

binaryplease wrote:

yaourt shows the packages that have new versions in git in red (screenshot: https://imgur.com/jPBo7bg) though.

The version in red is what you already have installed.

Offline

Board footer

Powered by FluxBB