summaryrefslogtreecommitdiffstats
path: root/urpm/args.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm/args.pm')
-rw-r--r--urpm/args.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/urpm/args.pm b/urpm/args.pm
index 67da7130..c55bf10e 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -4,6 +4,7 @@ use strict;
use warnings;
no warnings 'once';
use Getopt::Long;# 2.33;
+use urpm::download;
# The program that invokes us
(my $tool = $0) =~ s!.*/!!;
@@ -85,12 +86,14 @@ my %options_spec = (
my ($proxy, $port) = $value =~ m,^(?:http://)?([^:]+(:\d+)?)/*$,
or die N("bad proxy declaration on command line\n");
$proxy .= ":1080" unless $port;
- $urpm->{proxy}{http_proxy} = "http://$proxy";
+ $urpm->{proxy}{http_proxy} = "http://$proxy"; #- obsolete, for compat
+ urpm::download::set_cmdline_proxy(http_proxy => "http://$proxy");
},
'proxy-user=s' => sub {
my (undef, $value) = @_;
$value =~ /(.+):(.+)/ or die N("bad proxy declaration on command line\n");
- @{$urpm->{proxy}}{qw(user pwd)} = ($1, $2);
+ @{$urpm->{proxy}}{qw(user pwd)} = ($1, $2); #- obsolete, for compat
+ urpm::download::set_cmdline_proxy(user => $1, pwd => $2);
},
'bug=s' => \$options{bug},
'env=s' => \$::env,