mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-02-28 17:30:25 +00:00
buildrepo: speed up by avoiding forks
This commit is contained in:
parent
ef25c6cf41
commit
f197c51d78
16
buildrepo.in
16
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 \
|
||||
|
Loading…
Reference in New Issue
Block a user