summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-01-23 09:30:51 +0000
committerFrancois Pons <fpons@mandriva.com>2003-01-23 09:30:51 +0000
commitfece8f144f24a45fbbdb92ac2bcbe017379c09d3 (patch)
tree0f202ea079f2f583326990a9a5ed756c83eacaa5 /urpm.pm
parentb388a40315581317d91d2211e26295e6f0e880ac (diff)
downloadurpmi-fece8f144f24a45fbbdb92ac2bcbe017379c09d3.tar
urpmi-fece8f144f24a45fbbdb92ac2bcbe017379c09d3.tar.gz
urpmi-fece8f144f24a45fbbdb92ac2bcbe017379c09d3.tar.bz2
urpmi-fece8f144f24a45fbbdb92ac2bcbe017379c09d3.tar.xz
urpmi-fece8f144f24a45fbbdb92ac2bcbe017379c09d3.zip
fixed proxy management according to idea from bug 994.
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/urpm.pm b/urpm.pm
index 9e7164bf..d6790d42 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -226,7 +226,7 @@ sub sync_wget {
my $options = shift @_;
my ($buf, $file) = ('', undef);
open WGET, "-|", "/usr/bin/wget",
- (ref $options && set_proxy({type => "wget", proxy => $options->{proxy}})),
+ (ref $options && $options->{proxy} ? set_proxy({type => "wget", proxy => $options->{proxy}}) : ()),
(ref $options && $options->{callback} ? ("--progress=bar:force", "-o", "-") :
ref $options && $options->{quiet} ? ("-q") : ("")),
"--retr-symlinks", "-NP",
@@ -271,7 +271,7 @@ sub sync_curl {
#- prepare to get back size and time stamp of each file.
open CURL, "/usr/bin/curl" .
- " " . (ref $options && set_proxy({type => "curl", proxy => $options->{proxy}})) .
+ " " . (ref $options && $options->{proxy} ? set_proxy({type => "curl", proxy => $options->{proxy}}) : ()) .
" -s -I " . join(" ", map { "'$_'" } @ftp_files) . " |";
while (<CURL>) {
if (/Content-Length:\s*(\d+)/) {