mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2024-12-22 07:00:28 +00:00
buildrepo: faster purging of old packages
This commit is contained in:
parent
73918f526c
commit
074f43536d
17
buildrepo.in
17
buildrepo.in
@ -33,9 +33,22 @@ usage() {
|
||||
|
||||
|
||||
listpackages() {
|
||||
cd "$aportsdir/$1"
|
||||
local repo="$1" i= pkgname= pkgver= pkgrel= subpackage= arch= subpkg=
|
||||
cd "$aportsdir/$repo"
|
||||
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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user