You are not logged in.

#26 2009-04-02 19:36:38

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: What is you favourite program to update packages installed by aur?

ezzetabi wrote:

I used aurbuild, but I saw there are many... So what is your pacman for AUR? And overall why?

my own pkgman (see below) big_smile

Offline

#27 2009-04-10 12:15:40

sirocco
Member
Registered: 2008-03-10
Posts: 149

Re: What is you favourite program to update packages installed by aur?

pointone wrote:

Custom Python script that simply downloads remote PKGBUILDs and compares '%(pkgver)s-%(pkgrel)s' with the output from `pacman -Qm`. If a newer version is found, it will grab the tarball for me.

Good script, but does not work in the absence of the remote PKGBUILD.

Traceback (most recent call last):
  File "./upaur.py", line 38, in <module>
    remote_ver = '%(pkgver)s-%(pkgrel)s' % pkgbuild
KeyError: 'pkgver'

Last edited by sirocco (2009-04-10 12:16:24)

Offline

#28 2009-04-11 02:59:32

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,799
Website

Re: What is you favourite program to update packages installed by aur?

#!/bin/bash
#
# AurCheck V 0.1
#
# pbrisbin 2009
#
# script parses aur.archlinux PKGBUILDs and compares
# it to `pacman -Qm` outputs to find out if you've
# got the latest aur package installed
#
###

# setup colors
if [ $(tput colors) -eq 256 ]; then
  color0="[1;38;5;229m"
  color1="[0;38;5;40m"
  color2="[0;38;5;160m"
else
  color0="[1;37m"
  color1="[0;32m"
  color2="[0;31m"
fi

# error handling
errorout() {
  echo ""
  echo -e " \e${color2}Error:\e[0m"
  echo "$1"
  echo ""
  exit 1
}

[ $(tput cols) -lt 70 ] && errorout " Your terminal is not wide enough to run this script."

# Set up a working directory
WD="/tmp/aurcheck"
[ -d $WD ] || mkdir $WD

# Set up a list of updatable packages
list="$WD/aurlist"
[ -f $list ] || touch $list

# print a header row 
echo ""
line="$(echo Package Available Installed | awk '{printf "%-30s %20s %20s\n", $1, $2, $3}')"
echo -e "\e$color0$line\e[0m"

# list out foreign packages and check the versions
pacman -Qm | while read pack; do
  name="$(echo $pack | awk '{print $1}')"
  pkgver="$(echo $pack | awk '{print $2}' | cut -d "-" -f 1)"
  pkgrel="$(echo $pack | awk '{print $2}' | cut -d "-" -f 2)"
  URL="http://aur.archlinux.org/packages/${name}/${name}/PKGBUILD"
  wget -q -O $WD/PKGBUILD "$URL" || errorout "Count not download package information"
  
  pkgverN="$(grep ^pkgver $WD/PKGBUILD | cut -d "=" -f 2 | tr -d '"')"
  pkgrelN="$(grep ^pkgrel $WD/PKGBUILD | cut -d "=" -f 2 | tr -d '"')"
  line="$(echo $name ${pkgverN}-${pkgrelN} ${pkgver}-${pkgrel} | awk '{printf "%-30s %20s %20s\n", $1, $2, $3}')"
  
  if [ "${pkgver}-${pkgrel}" = "${pkgverN}-${pkgrelN}" ]; then
    echo -e "\e$color1$line\e[0m"
  else
    echo -e "\e$color2$line\e[0m"
    echo $name >> $list
  fi
done

echo ""

# cleanup
[ -d $WD ] && rm -rf $WD

exit 0

Offline

#29 2009-04-11 05:49:47

sirocco
Member
Registered: 2008-03-10
Posts: 149

Re: What is you favourite program to update packages installed by aur?

Thank you.
One question - as i see, scripts on ftp://pbrisbin.com/bin, http://bbs.archlinux.org/viewtopic.php?id=56646&p=12 and this topic are differ. Although version is the same (AurCheck V 0.1).

For me best script from http://bbs.archlinux.org/viewtopic.php?id=56646&p=12.
Other two print

 Error:
Count not download package information

for packages without the remote PKGBUILD.

Last edited by sirocco (2009-04-11 05:56:08)

Offline

#30 2009-04-12 17:32:54

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,799
Website

Re: What is you favourite program to update packages installed by aur?

sirocco, thanks for the interest my 'scripts'

sadly i don't do much "version tracking" or "version control" in any way.  i have that "V 0.1" bit in my script template and should really take it out.  the one's on ftp://pbrisbin.com/bin are the most up to date because that's just a symlink to my actual ~/.bin directory which i update and use every day.

i should've noted.  if the URL is not exactly http://aur.archlinux.org/packages/NAME/NAME/PKGBUILD where NAME is the exact name output by pacman -Qm then this script falls flat on it's face.  and i think the only major difference between the scripts is how that's handled.  (i.e. in my ~/.bin version i have an errorout() funciton that sees the wget failure and prints that message).

can't promise you any fixes coming, but feel free to change it to suit your needs it's not very complicated (or elegant smile).

also my ~/.bin version will optionally use my ~/.bin/aurget script to update the package; which i took out in this thread for obvious reasons.

Offline

#31 2009-04-12 17:37:23

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: What is you favourite program to update packages installed by aur?

Why don't you use http://aur.archlinux.org/rpc.php to get that information instead?


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

Offline

#32 2009-04-12 17:59:40

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,799
Website

Re: What is you favourite program to update packages installed by aur?

thanks Xyne, that looks much more useful to my aurget and aurcheck scripts.  it'll require some extensive rewrites and little learning on my part though.  considering how well these work for me now, it could be a bit before i get to that .php stuff.  thanks though.

edit: Xyne, that makes things much cleaner.  i've updated both aurget and aurcheck to use it.  i'm sure there's a million better ways, but it works for me; new versions in my signature.

Last edited by brisbin33 (2009-04-12 21:16:44)

Offline

#33 2009-04-13 12:19:21

jordz
Member
Registered: 2006-02-01
Posts: 250

Re: What is you favourite program to update packages installed by aur?

Thanks brisbin33 for your aurget/aurcheck scripts, I was looking for something similar.
I want do download your new versions from you ftp, but the bin folder is empty smile

Offline

#34 2009-04-13 13:35:52

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,799
Website

Re: What is you favourite program to update packages installed by aur?

jordz, i've been having some issues with that lately; my ftp site works for some, not for others.  it's working for me from my work machine now, please try again.  if you have no joy, feel free to email me and i can send them to you.

Last edited by brisbin33 (2009-04-13 13:40:26)

Offline

#35 2009-04-13 14:40:05

jordz
Member
Registered: 2006-02-01
Posts: 250

Re: What is you favourite program to update packages installed by aur?

brisbin33 wrote:

jordz, i've been having some issues with that lately; my ftp site works for some, not for others.  it's working for me from my work machine now, please try again.  if you have no joy, feel free to email me and i can send them to you.

I think it has something to do with your ftp server and passive connections.
I tried and guessed a bit with wget and it works now smile

wget ftp://pbrisbin.com/bin/aur* --no-passive-ftp

For your ftp to work you need to open/forward some ports which you specify in you ftp config for you passive connections.

Offline

#36 2009-04-13 14:47:50

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,799
Website

Re: What is you favourite program to update packages installed by aur?

jordz wrote:
brisbin33 wrote:

jordz, i've been having some issues with that lately; my ftp site works for some, not for others.  it's working for me from my work machine now, please try again.  if you have no joy, feel free to email me and i can send them to you.

I think it has something to do with your ftp server and passive connections.
I tried and guessed a bit with wget and it works now smile

wget ftp://pbrisbin.com/bin/aur* --no-passive-ftp

For your ftp to work you need to open/forward some ports which you specify in you ftp config for you passive connections.

thanks for the tips, my vsftpd.conf specifies passive ports 50000 to 50100 which are forwarded on my router.  along with the standard 21 and nonstandard 50120 which i've also called out.   

it's really frustrating.  sitting behind my work firewall on my work pc i can `tail -f vsftpd.log` (i'm ssh'd in) and see my passive connection go through just fine.  then, i talk to my brother or another random archer not unlike yourself and `tail -f vsftpd.log` shows it choking when switching to PASV; no errors, just hangs. 

furthermore, that wget --no-passive-ftp command also works for some and not for others; and if i make any changes to my vsftpd.conf (like adding "connect_from_port_20=" or "passive_address=") to try and make it better, everything fails. 

it'll be it's own forum post shortly... glad you got it working for you, enjoy the scripts.

EDIT: i finally fixed it! --i think-- adding pasv_promiscuous=YES (however unadvised in the man page) solved it for me.  thanks to wget -vd, it appears my router situation was making vsftpd think certain requests were coming from a different IP than the connection and therefore was blocking things i didn't want blocked.

Last edited by brisbin33 (2009-04-13 20:23:09)

Offline

#37 2009-04-13 23:41:53

jordz
Member
Registered: 2006-02-01
Posts: 250

Re: What is you favourite program to update packages installed by aur?

Good to hear you solved it smile
I created my own "aurget" today, I used your search and update function as a base in my scripts, thanks again!
If you want to take a look, I uploaded it to github: http://github.com/jordz/aurget/tree/master

Edit:
I created a package for it, to make my life easier smile
http://aur.archlinux.org/packages.php?ID=25551

Last edited by jordz (2009-04-14 00:14:55)

Offline

#38 2009-04-19 19:30:21

gjoellee
Member
Registered: 2008-12-12
Posts: 82

Re: What is you favourite program to update packages installed by aur?

yaourt


Entertain yourself in a stupid way: www.stupidreality.org

Offline

#39 2009-04-20 13:35:58

jordz
Member
Registered: 2006-02-01
Posts: 250

Re: What is you favourite program to update packages installed by aur?

I updated aurget to fix a few problems with rpc from AUR and show different colors when updating.
When a local package is newer than on AUR and if it's a devel package (git/svn etc).
Added a build option, to build the PKGBUILD in the current folder.

The script is simple and does everything I need smile

Edit: I don't like yaourt because it isn't KISS smile

Last edited by jordz (2009-04-20 13:36:46)

Offline

Board footer

Powered by FluxBB