summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-09-07 17:49:56 +0000
committerThierry Vignaud <tv@mageia.org>2012-09-07 17:49:56 +0000
commit377315485c758391a07b1d3377b7a03c23959ab4 (patch)
tree979fc8fbca1ba1052a267d8feb677366bc6865a6
parent9fadc552f42c75b725ad8f13052da9fc1c01bb29 (diff)
downloaddrakx-backup-do-not-use-377315485c758391a07b1d3377b7a03c23959ab4.tar
drakx-backup-do-not-use-377315485c758391a07b1d3377b7a03c23959ab4.tar.gz
drakx-backup-do-not-use-377315485c758391a07b1d3377b7a03c23959ab4.tar.bz2
drakx-backup-do-not-use-377315485c758391a07b1d3377b7a03c23959ab4.tar.xz
drakx-backup-do-not-use-377315485c758391a07b1d3377b7a03c23959ab4.zip
(ftp_prepare) retry with FTP instead of HTTP when there's no proxy and
user didn't provided the architecture in the URL (small issue introduced in commit r2774 on 2012-01-23, was: "(ftp_prepare) try arched directory for FTP installs too...")
-rw-r--r--mdk-stage1/NEWS2
-rw-r--r--mdk-stage1/network.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/mdk-stage1/NEWS b/mdk-stage1/NEWS
index 6f7a51b39..f49a64263 100644
--- a/mdk-stage1/NEWS
+++ b/mdk-stage1/NEWS
@@ -1,5 +1,7 @@
- fix URL passed to stage2 when user didn't provide the arch in the
install path (mga#6823)
+- retry with FTP instead of HTTP when there's no proxy and user didn't
+ provided the architecture in the URL
1.71
- silent hid_generic loading
diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c
index 55249fa34..9030fbbde 100644
--- a/mdk-stage1/network.c
+++ b/mdk-stage1/network.c
@@ -1077,7 +1077,10 @@ enum return_type ftp_prepare(void)
log_message("%s failed.", location_full);
char *with_arch = asprintf_("%s%s/%s/%s", answers[1][0] == '/' ? "" : "/", answers[1], ARCH, COMPRESSED_FILE_REL("/"));
log_message("trying %s...", with_arch);
- fd = http_download_file(answers[0], with_arch, &size, use_http_proxy ? "http" : NULL, http_proxy_host, http_proxy_port);
+ if (use_http_proxy)
+ fd = http_download_file(answers[0], with_arch, &size, use_http_proxy ? "http" : NULL, http_proxy_host, http_proxy_port);
+ else
+ fd = ftp_start_download(ftp_serv_response, with_arch, &size);
if (0 < fd) {
strcpy(location_full, with_arch);
need_arch = 1;