]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- -p N, -pN - set PARALLEL_DOWNLOADS
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 14 Jun 2012 19:54:13 +0000 (19:54 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    builder.sh -> 1.675

builder.sh

index 2fb9c3bf72ed9435350c6f997bccac70ba258e0f..f62ba7d891e48adf00e5d77b649157761956077e 100644 (file)
@@ -113,6 +113,7 @@ PROTOCOL="http"
 # use lftp by default when available
 USE_LFTP=
 lftp --version > /dev/null 2>&1 && USE_LFTP=yes
+PARALLEL_DOWNLOADS=10
 
 WGET_RETRIES=${MAX_WGET_RETRIES:-0}
 
@@ -272,7 +273,7 @@ download_lftp() {
                set ssl:verify-certificate no;
                set net:max-retries $WGET_RETRIES;
                set http:user-agent \"$USER_AGENT\";
-               pget -n 10 -c \"$url\" -o \"$tmpfile\"
+               pget -n $PARALLEL_DOWNLOADS -c \"$url\" -o \"$tmpfile\"
        "
 
        retval=$?
@@ -345,6 +346,7 @@ Usage: builder [-D|--debug] [-V|--version] [--short-version] [--as_anon] [-a|--a
 -ns, --no-srcs      - don't download Sources/Patches
 -ns0, --no-source0  - don't download Source0
 -nn, --no-net       - don't download anything from the net
+-pN, -p N           - set PARALLEL_DOWNLOADS to N (default $PARALLEL_DOWNLOADS)
 -pm, --prefer-mirrors - prefer mirrors (if any) over distfiles for SOURCES
 --no-init           - don't initialize builder paths (SPECS and SOURCES)
 -ske,
@@ -2241,6 +2243,14 @@ while [ $# -gt 0 ]; do
                        RPMOPTS="${RPMOPTS} --define \"_smp_mflags $1\""
                        shift
                        ;;
+               -p)
+                       PARALLEL_DOWNLOADS=$2
+                       shift 2
+                       ;;
+               -p[0-9])
+                       PARALLEL_DOWNLOADS=${1#-p}
+                       shift
+                       ;;
                -l | --logtofile )
                        shift; LOGFILE="${1}"; shift ;;
                -ni| --nice )
This page took 0.048866 seconds and 4 git commands to generate.