buildrepo: faster purging of old packages

This commit is contained in:
Natanael Copa 2013-02-22 10:12:43 +00:00
parent 73918f526c
commit 074f43536d

View File

@ -33,9 +33,22 @@ usage() {
listpackages() { listpackages() {
cd "$aportsdir/$1" local repo="$1" i= pkgname= pkgver= pkgrel= subpackage= arch= subpkg=
cd "$aportsdir/$repo"
for i in */APKBUILD; do for i in */APKBUILD; do
APKBUILD=$i abuild listpkg cd "$aportsdir/$repo"/${i%/*} || return 1
pkgname=
pkgver=
pkgrel=
subpackages=
arch=
. ./APKBUILD
if ! is_in all $arch && ! is_in "$CARCH" $arch; then
continue
fi
for subpkg in $pkgname $subpackages; do
echo ${subpkg%:*}-$pkgver-r$pkgrel.apk
done
done done
} }