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 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main/abuild/0002-add-fetch-from-source-mirror.patch b/main/abuild/0002-add-fetch-from-source-mirror.patch index 926dbcc9a1..5cd9648526 100644 --- a/main/abuild/0002-add-fetch-from-source-mirror.patch +++ b/main/abuild/0002-add-fetch-from-source-mirror.patch @@ -15,7 +15,7 @@ diff -rupN orig/abuild-2.1/abuild.in src/abuild-2.1/abuild.in # we need GNU wget for this case "$uri" in https://*) opts="--no-check-certificate";; -@@ -178,12 +177,22 @@ is_remote() { +@@ -178,12 +177,26 @@ is_remote() { return 1 } @@ -24,7 +24,11 @@ diff -rupN orig/abuild-2.1/abuild.in src/abuild-2.1/abuild.in + local uri="$1" + local d="${uri##*/}" # $(basename $uri) + if [ -n "$DISTFILES_MIRROR" ]; then -+ uri_fetch "$DISTFILES_MIRROR"/$d && return 0 ++ if [ -f "$DISTFILES_MIRROR"/$d ] ; then ++ cp "$DISTFILES_MIRROR"/$d . ++ else ++ uri_fetch "$DISTFILES_MIRROR"/$d && return 0 ++ fi + fi + uri_fetch "$uri" +} |