You are not logged in.

#1 2013-01-19 15:56:09

Leduck
Member
From: Brazil
Registered: 2011-04-25
Posts: 48
Website

Monitor updating AUR packages

I like to compile packages from AUR with makepkg instead of using the tools pacaur or yaourt, but would like some suggestions to follow the updates of packages in AUR because the RSS of all I get and I would just keep the ones I use .

Thank you,

Offline

#2 2013-01-19 16:47:44

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: Monitor updating AUR packages

"cower -u" sounds exactly like what you need.

Offline

#3 2013-01-19 17:55:06

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Monitor updating AUR packages

crontab +

#!/bin/bash
# Check for AUR updates and Aurphans

aurfile=$(mktemp -t aurupdates.XXXXXX)
orpfile=$(mktemp -t aurphans.XXXXXX)

# remove old files
[[ ( -e "$aurfile" && -e "$orpfile" ) ]] && rm /tmp/aur{phans,updates}*

# check for updates
/usr/bin/cower --color=never -u > "$aurfile"

/usr/bin/aurphan -a > "$orpfile"

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2013-01-19 19:03:53

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Monitor updating AUR packages

You can use paconky if you want to display upgradable packages in conky.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#5 2013-01-19 19:07:10

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

Re: Monitor updating AUR packages

I use my own aur script - the option that checks for updates (but does not install them) just does the following:

pacman -Qm | while read line; do
   pkg=${line% *}
   local_ver=${line#* }
   aur_ver=$(lynx -dump -width 1024 -nolist \
       "https://aur.archlinux.org/packages.php?SeB=x&K=$pkg" |
       awk '/'$pkg'/ { print $3; }')
# your code here to compare local_ver to aur_ver and print any display you'd like
done

Last edited by Trilby (2013-01-19 19:07:28)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2013-01-20 13:53:24

Leduck
Member
From: Brazil
Registered: 2011-04-25
Posts: 48
Website

Re: Monitor updating AUR packages

Thanks. I liked the suggestions, I'll view the who fits best, thank you all.

Offline

#7 2013-01-20 14:48:45

aesiris
Member
Registered: 2012-02-25
Posts: 97

Re: Monitor updating AUR packages

Trilby wrote:

I use my own aur script - the option that checks for updates (but does not install them) just does the following:[...]

I am doing something similar with a bash script.
But instead of downloading the AUR web page, I am reading the JSON from https://aur.archlinux.org/rpc.php with jshon.
With my slow connection this makes a big difference.

It is something like this (actual code on github)

for pkg in "$@"; do
        args+='&arg[]='"$pkg"
done
json="$( wget "https://aur.archlinux.org/rpc.php?type=multiinfo${args}" -o /dev/null -O - )"

exec 3< <( jshon <<<"$json" -e results -a -e Name -u )
exec 4< <( jshon <<<"$json" -e results -a -e Version -u )

declare -A aurversion
while read name <&3 && read version <&4; do
        aurversion["$name"]="$version"
done
exec 3<&- 4<&-

echo "${aurversion[@]}"
#code to compare and print

Offline

Board footer

Powered by FluxBB