diff options
Diffstat (limited to 'main/abuild/0002-add-fetch-from-source-mirror.patch')
-rw-r--r-- | main/abuild/0002-add-fetch-from-source-mirror.patch | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/main/abuild/0002-add-fetch-from-source-mirror.patch b/main/abuild/0002-add-fetch-from-source-mirror.patch deleted file mode 100644 index 5cd964852..000000000 --- a/main/abuild/0002-add-fetch-from-source-mirror.patch +++ /dev/null @@ -1,107 +0,0 @@ -diff -rupN orig/abuild-2.1/abuild.in src/abuild-2.1/abuild.in ---- orig/abuild-2.1/abuild.in 2009-12-30 04:05:49.000000000 -0500 -+++ src/abuild-2.1/abuild.in 2010-04-29 09:21:43.000000000 -0400 -@@ -149,12 +149,11 @@ md5check() { - - uri_fetch() { - local uri="$1" -- local d="${s##*/}" # $(basename $s) -+ local d="${uri##*/}" # $(basename $uri) - local opts - [ -n "$quiet" ] && opts="-q" - [ -f "$SRCDEST/$d" ] && return 0 - -- - # we need GNU wget for this - case "$uri" in - https://*) opts="--no-check-certificate";; -@@ -178,12 +177,26 @@ is_remote() { - return 1 - } - -+# try download from file from mirror first -+uri_fetch_mirror() { -+ local uri="$1" -+ local d="${uri##*/}" # $(basename $uri) -+ if [ -n "$DISTFILES_MIRROR" ]; then -+ if [ -f "$DISTFILES_MIRROR"/$d ] ; then -+ cp "$DISTFILES_MIRROR"/$d . -+ else -+ uri_fetch "$DISTFILES_MIRROR"/$d && return 0 -+ fi -+ fi -+ uri_fetch "$uri" -+} -+ - default_fetch() { - local s - mkdir -p "$srcdir" - for s in $source; do - if is_remote "$s"; then -- uri_fetch "$s" || return 1 -+ uri_fetch_mirror "$s" || return 1 - ln -sf "$SRCDEST/${s##*/}" "$srcdir"/ - else - ln -sf "$startdir/$s" "$srcdir/" -@@ -308,6 +317,12 @@ build() { - : - } - -+# generate a simple tar.gz package of pkgdir -+targz() { -+ cd "$pkgdir" || return 1 -+ tar -czf "$PKGDEST"/$pkgname-$pkgver-r$pkgrel.tar.gz * -+} -+ - get_split_func() { - # get the 'func' from "sub-pkg:func" - local func=${1##*:} -@@ -712,8 +727,8 @@ up2date() { - depparse_aports() { - # lets run this in a subshell since we source all APKBUILD here - ( -- aportsdir=$(realpath ${APKBUILD%/APKBUILD}/../..) -- for i in $aportsdir/*/*/APKBUILD; do -+ aportsdir=$(realpath ${APKBUILD%/APKBUILD}/..) -+ for i in $aportsdir/*/APKBUILD; do - pkgname= - subpackages= - depends= -@@ -811,7 +826,13 @@ builddeps() { - - uninstall_after=".makedepends-$pkgname $uninstall_after" - if [ -n "$install_deps" ] && [ -z "$recursive" ]; then -+ # make a --simluate run first to detect missing deps -+ # apk-tools --virtual is no goot at reporting those. -+ $SUDO apk add --repository "$apkcache" \ -+ --wait 30 \ -+ --simulate --quiet $deps || return 1 - $SUDO apk add --repository "$apkcache" \ -+ --wait 30 \ - --virtual .makedepends-$pkgname $deps \ - && return 0 - fi -@@ -834,6 +855,7 @@ builddeps() { - cd "$dir" && $0 -k -r apkcache || return 1 - done - $SUDO apk add -u --repository "$apkcache" \ -+ --wait 30 \ - --virtual .makedepends-$pkgname $deps - } - -@@ -945,12 +967,13 @@ post_add() { - post_add $i || return 1 - fi - done -- $SUDO apk add -u "$pkgf" || die "Failed to install $1" -+ $SUDO apk add --wait 30 -u "$pkgf" || die "Failed to install $1" - } - - installdeps() { - local deps i -- sudo apk add --repository "$apkcache" --virtual .makedepends-$pkgname \ -+ sudo apk add --wait 30 --repository "$apkcache" \ -+ --virtual .makedepends-$pkgname \ - $makedepends - } - |