[pacman-dev] List packages from a given repo

Allan McRae mcrae_allan at hotmail.com
Thu May 8 20:46:12 EDT 2008


Dan McGee wrote:
> The magic:
>
> pkglist=$(mktemp)
> pacman -Sl $1 > $pkglist
>
> pacman -Q | while read pkg; do
>   ret=0
>   grep -q "$pkg" $pkglist || ret=$?
>   if [ $ret -eq 0 ]; then
>     echo $pkg
>   fi
> done
>
> rm $pkglist

Nice!  I will submit the patch which adds this script to contrib later 
today. 

Cheers,
Allan







More information about the pacman-dev mailing list