summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2023-01-21 10:07:26 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2023-01-21 10:07:26 +0000
commitf3f7262171c42f3396add139e9202411a1444559 (patch)
treeb5671f16059067dc1ef6a15fc8c6ba5158c5ab07
parentdfe0f42dcbc3838a2d0807705d411e6411d350f0 (diff)
downloadurpmi-f3f7262171c42f3396add139e9202411a1444559.tar
urpmi-f3f7262171c42f3396add139e9202411a1444559.tar.gz
urpmi-f3f7262171c42f3396add139e9202411a1444559.tar.bz2
urpmi-f3f7262171c42f3396add139e9202411a1444559.tar.xz
urpmi-f3f7262171c42f3396add139e9202411a1444559.zip
Fix curl options to allow it to follow HTTP redirections (mga#31339)
'curl -h' no longer outputs the full list of options, so the test for whether '--location-trusted' is supported always failed. As that option was added to curl in 2003, we can reasonably assume it is available.
-rw-r--r--Changes1
-rw-r--r--urpm/download.pm7
2 files changed, 2 insertions, 6 deletions
diff --git a/Changes b/Changes
index d7de3aba..23a5d7af 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,6 @@
- library:
o prefer wget to curl as the default downloader (mga#24362)
+ o fix curl options to allow it to follow HTTP redirections (mga#31339)
- cpan_testers:
o Skip mirrorlist tests if there's only one broken mirror such as on mga[1-6]
- urpmq:
diff --git a/urpm/download.pm b/urpm/download.pm
index 2d10f9ce..e09bb854 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -478,11 +478,6 @@ sub sync_curl {
}
}
}
- # Indicates whether this option is available in our curl
- our $location_trusted;
- if (!defined $location_trusted) {
- $location_trusted = `/usr/bin/curl -h` =~ /location-trusted/ ? 1 : 0;
- }
#- http files (and other files) are correctly managed by curl wrt conditional download.
#- options for ftp files, -R (-O <file>)*
#- options for http files, -R (-O <file>)*
@@ -500,7 +495,7 @@ sub sync_curl {
($options->{retry} ? ('--retry', $options->{retry}) : @{[]}),
($options->{quiet} ? "-s" : @{[]}),
($options->{"no-certificate-check"} ? "-k" : @{[]}),
- $location_trusted ? "--location-trusted" : @{[]},
+ "--location-trusted",
"-R",
"-f",
"--disable-epsv",