You are not logged in.

#1 2010-01-31 13:27:29

raymboard
Member
Registered: 2010-01-22
Posts: 61

How to get a list of packages installed from the AUR?

Hi.

How to get a list of packages installed from the AUR?


Linux is not an operating system it's a kernel. You're using GNU/Linux. http://www.gnu.org/gnu/linux-and-gnu.html

Offline

#2 2010-01-31 13:35:13

V for Vivian
Member
Registered: 2009-04-28
Posts: 52

Re: How to get a list of packages installed from the AUR?

edit: ups, didn't really read the question...

Last edited by V for Vivian (2010-01-31 13:36:53)


YES WE CAN
(but that doesn't necessarily mean we're going to)

Offline

#3 2010-01-31 13:41:18

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: How to get a list of packages installed from the AUR?

pacman -Qm


Give what you have. To someone, it may be better than you dare to think.

Offline

#4 2010-01-31 13:45:45

V for Vivian
Member
Registered: 2009-04-28
Posts: 52

Re: How to get a list of packages installed from the AUR?

Some time ago I found following script somewhere in the forum. It shows which packages are outdated.

#!/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
#
###

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

# print a header row
echo ""
line="$(echo Package Available Installed | \
  awk '{printf "%-30s %20s %20s\n", $1, $2, $3}')"
echo -e "\e[1;37m$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"

  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[0;32m$line\e[0m"
  else
    echo -e "\e[1;31m$line\e[0m"
  fi
done

echo ""

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

exit 0

YES WE CAN
(but that doesn't necessarily mean we're going to)

Offline

#5 2010-01-31 14:13:38

raymboard
Member
Registered: 2010-01-22
Posts: 61

Re: How to get a list of packages installed from the AUR?

Thanks.


Linux is not an operating system it's a kernel. You're using GNU/Linux. http://www.gnu.org/gnu/linux-and-gnu.html

Offline

#6 2010-01-31 17:39:35

NeedCoffee2
Member
From: California
Registered: 2009-05-04
Posts: 9

Re: How to get a list of packages installed from the AUR?

There is a program in AUR named "aurcheck" that does this:

http://aur.archlinux.org/packages.php?ID=28009

I have been using it for awhile and it works well for me.

Offline

Board footer

Powered by FluxBB