[pacman-dev] List packages from a given repo

Allan McRae mcrae_allan at hotmail.com
Thu May 8 19:47:12 EDT 2008


R. Dale Thomas wrote:
> 	[snip]
>
> Well, I made the following changes to speed it up by 40%:
>
> 39c39
> < pacman -Sl > $pkglist
> ---
>  > pacman -Sl | grep "^$1" > $pkglist
> 42c42
> <   match=$(grep -m1 " $pkg " $pkglist | grep "^$1")
> ---
>  >   match=$(grep -m1 " $pkg " $pkglist)
>
>   

The problem with those changes is if a package is in [testing] and 
[core] you only want to match it to the first repo in your pacman.conf 
(i.e. [testing] in this case).  Your change would match it in both repos.

Allan






More information about the pacman-dev mailing list