]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- prefer mirror over distfiles if there's mirror set
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 6 Dec 2006 14:24:15 +0000 (14:24 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    builder.sh -> 1.468

builder.sh

index ea58a588619e5690d30f593b4f38bb992304084d..913f14b37af466727fa9e982994b15acad27f676 100644 (file)
@@ -895,7 +895,15 @@ get_files()
                                                continue
                                        fi
                                        target="$fp"
-                                       url=$(distfiles_url "$i")
+
+                                       # prefer mirror over distfiles if there's mirror
+                                       # TODO: build url list and then try each url from the list
+                                       if [ -z "$NOMIRRORS" ] && im=$(find_mirror "$i") && [ "$im" != "$i" ]; then
+                                               url="$im"
+                                       else
+                                               url=$(distfiles_url "$i")
+                                       fi
+
                                        url_attic=$(distfiles_attic_url "$i")
                                        FROM_DISTFILES=1
                                        # is $url local file?
This page took 0.050239 seconds and 4 git commands to generate.