buildrepo: only consider rebuilding packages that has proper arch set

This commit is contained in:
Natanael Copa 2013-02-22 09:53:55 +00:00
parent b1b093180f
commit 73918f526c
1 changed files with 15 additions and 0 deletions

View File

@ -47,6 +47,16 @@ all_exist() {
return 0
}
is_in() {
local needle="$1"
shift
while [ $# -gt 0 ]; do
[ "$needle" = "$1" ] && return 0
shift
done
return 1
}
list_needbuild() {
local repo="$1" i=
@ -63,8 +73,13 @@ list_needbuild() {
pkgver=
pkgrel=
subpackages=
arch=
. ./APKBUILD
if ! is_in all $arch && ! is_in $CARCH $arch; then
continue
fi
pkgs=
for subpkg in $pkgname $subpackages; do
pkgfile=${subpkg%:*}-$pkgver-r$pkgrel.apk