summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-03-27 15:23:34 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-03-27 15:23:34 +0000
commit74599bd2ab6f0f3456812e20a4a07867af21c31e (patch)
tree997d555d81271c1f1500782c9d84040407177a77
parent1280a14aab297789abe526246bc4fa53eacd58ba (diff)
downloadurpmi-74599bd2ab6f0f3456812e20a4a07867af21c31e.tar
urpmi-74599bd2ab6f0f3456812e20a4a07867af21c31e.tar.gz
urpmi-74599bd2ab6f0f3456812e20a4a07867af21c31e.tar.bz2
urpmi-74599bd2ab6f0f3456812e20a4a07867af21c31e.tar.xz
urpmi-74599bd2ab6f0f3456812e20a4a07867af21c31e.zip
fix MandrakeClub downloads problem: take advantage of
--location-trusted when available (available in curl >= 7.10.3-2mdk)
-rw-r--r--urpm.pm6
-rw-r--r--urpmi.spec7
2 files changed, 9 insertions, 4 deletions
diff --git a/urpm.pm b/urpm.pm
index f9198635..5b0eedd0 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -208,10 +208,9 @@ sub sync_curl {
local *CURL;
my $options = shift @_;
chdir(ref($options) ? $options->{dir} : $options);
- my (@ftp_files, @other_files, $use_https);
+ my (@ftp_files, @other_files);
foreach (@_) {
/^ftp:\/\/.*\/([^\/]*)$/ && -s $1 > 8192 and do { push @ftp_files, $_; next }; #- manage time stamp for large file only.
- $use_https ||= /^https:/;
push @other_files, $_;
}
if (@ftp_files) {
@@ -264,7 +263,8 @@ sub sync_curl {
(ref($options) && $options->{limit_rate} ? ("--limit-rate", $options->{limit_rate}) : ()),
(ref($options) && $options->{proxy} ? set_proxy({ type => "curl", proxy => $options->{proxy} }) : ()),
(ref($options) && $options->{quiet} && !$options->{verbose} ? "-s" : @{[]}),
- ($use_https ? "-k" : @{[]}), "-R", "-f", "--stderr", "-",
+ "-k", `curl -h` =~ /location-trusted/ ? "--location-trusted" : @{[]},
+ "-R", "-f", "--stderr", "-",
@all_files) . " |";
local $/ = \1; #- read input by only one char, this is slow but very nice (and it works!).
while (<CURL>) {
diff --git a/urpmi.spec b/urpmi.spec
index fb7f5010..3767d26e 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -2,7 +2,7 @@
Name: urpmi
Version: 4.2
-Release: 33mdk
+Release: 34mdk
License: GPL
Source0: %{name}.tar.bz2
Source1: %{name}.logrotate
@@ -199,6 +199,11 @@ $urpm->update_media;
%changelog
+* Thu Mar 27 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 4.2-34mdk
+- fix MandrakeClub downloads problem: take advantage of
+ --location-trusted when available (available in curl >=
+ 7.10.3-2mdk)
+
* Thu Mar 13 2003 François Pons <fpons@mandrakesoft.com> 4.2-33mdk
- fix bug 3258 (use curl -k only for https for curl of 9.0).