summaryrefslogtreecommitdiff
path: root/buildrepo.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-02-15 13:05:39 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-02-15 13:06:29 +0000
commitf197c51d788aacc1be4724521a9842c97b7c9d65 (patch)
treea6c4d2e439cb51f0ef7a561a50e4f79c0b10e3cb /buildrepo.in
parentef25c6cf41970368cce00be35fb5f715086b2c94 (diff)
downloadabuild-f197c51d788aacc1be4724521a9842c97b7c9d65.tar.gz
abuild-f197c51d788aacc1be4724521a9842c97b7c9d65.tar.bz2
abuild-f197c51d788aacc1be4724521a9842c97b7c9d65.tar.xz
abuild-f197c51d788aacc1be4724521a9842c97b7c9d65.zip
buildrepo: speed up by avoiding forks
Diffstat (limited to 'buildrepo.in')
-rwxr-xr-xbuildrepo.in16
1 files changed, 14 insertions, 2 deletions
diff --git a/buildrepo.in b/buildrepo.in
index 7ed2643..51031b1 100755
--- a/buildrepo.in
+++ b/buildrepo.in
@@ -53,12 +53,24 @@ build() {
[ -f "$aportsdir/$repo/$i" ] || continue
export REPODEST="$repodir"
cd "$aportsdir/$repo"/${i%/*} || return 1
- if abuild -k -q up2date 2>/dev/null; then
+ pkgname=
+ pkgver=
+ pkgrel=
+ subpackages=
+ . ./APKBUILD
+
+ pkgs=
+ for subpkg in $pkgname $subpackages; do
+ pkgfile=${subpkg%:*}-$pkgver-r$pkgrel.apk
+ if ! [ -f "$REPODEST/$repo/$CARCH/$pkgfile" ]; then
+ pkgs="$pkgs $pkgfile"
+ fi
+ done
+ if [ -z "$pkgs" ]; then
continue
fi
# try link or copy the files if they are in the ports dir
- pkgs=$(abuild listpkg)
if all_exist $pkgs; then
echo ">>> Copying " $pkgs
cp -p -l $pkgs "$repodir/$repo/$arch"/ 2>/dev/null \