]> git.saurik.com Git - apt.git/commitdiff
fix ADT failure in downloadfile()
authorMichael Vogt <mvo@debian.org>
Sat, 22 Feb 2014 21:04:22 +0000 (22:04 +0100)
committerMichael Vogt <mvo@debian.org>
Sat, 22 Feb 2014 21:04:22 +0000 (22:04 +0100)
test/integration/framework

index be2cb95d110105d657a0d3ba37c987e82e276a40..99214ef732c6748f3907cda3b9d048aa8bf10ef9 100644 (file)
@@ -935,6 +935,10 @@ changetocdrom() {
 
 downloadfile() {
        PROTO="$(echo "$1" | cut -d':' -f 1)"
+        if [ ! -x "${METHODSDIR}/${PROTO}" ]; then
+            msgwarn "can not find ${METHODSDIR}/${PROTO}"
+            return 1
+        fi
        local DOWNLOG="${TMPWORKINGDIRECTORY}/download.log"
        rm -f "$DOWNLOG"
        touch "$DOWNLOG"
@@ -963,7 +967,7 @@ Filename: ${2}
                                break
                        fi
                done
-       } | LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/methods/${PROTO} 2>&1 | tee "$DOWNLOG"
+       } | LD_LIBRARY_PATH=${BUILDDIRECTORY} ${METHODSDIR}/${PROTO} 2>&1 | tee "$DOWNLOG"
        rm "$DOWNLOG"
        # only if the file exists the download was successful
        if [ -e "$2" ]; then