summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-09-05 15:01:21 +0000
committerFrancois Pons <fpons@mandriva.com>2002-09-05 15:01:21 +0000
commite8476e9888b10dc4d2a6e2c7cbef605352f8f62c (patch)
treebc6c0296ee19f2837e4b887afa95bbaa0a4055f6
parenteb0e7578ddf22a08597d54c7cc5fe6336445a8db (diff)
downloadurpmi-e8476e9888b10dc4d2a6e2c7cbef605352f8f62c.tar
urpmi-e8476e9888b10dc4d2a6e2c7cbef605352f8f62c.tar.gz
urpmi-e8476e9888b10dc4d2a6e2c7cbef605352f8f62c.tar.bz2
urpmi-e8476e9888b10dc4d2a6e2c7cbef605352f8f62c.tar.xz
urpmi-e8476e9888b10dc4d2a6e2c7cbef605352f8f62c.zip
4.0-13mdk
-rwxr-xr-xurpmi4
-rwxr-xr-xurpmi.addmedia2
-rw-r--r--urpmi.spec6
-rwxr-xr-xurpmi.update2
-rwxr-xr-xurpmq22
5 files changed, 21 insertions, 15 deletions
diff --git a/urpmi b/urpmi
index 5a75b53b..1c9d4274 100755
--- a/urpmi
+++ b/urpmi
@@ -142,10 +142,10 @@ while (defined($_ = shift @ARGV)) {
urpm::sync_webfetch($options, @_) }; next };
/^--curl$/ and do { $sync = \&urpm::sync_webfetch; next };
/^--proxy$/ and do {
- my ($proxy, $port) = ($_ = shift @ARGV) =~ m,^(http://[^:]+(:\d+)?)/*$, or
+ my ($proxy, $port) = ($_ = shift @ARGV) =~ m,^(?:http://)?([^:]+(:\d+)?)/*$, or
die _("bad proxy declaration on command line\n");
$proxy .= ":1080" unless $port;
- $urpm->{proxy}{http_proxy} = $proxy;
+ $urpm->{proxy}{http_proxy} = "http://$proxy";
next;
};
/^--proxy-user$/ and do {
diff --git a/urpmi.addmedia b/urpmi.addmedia
index ed4682f5..ceb77ff2 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -65,7 +65,7 @@ and [options] are from
urpm::sync_webfetch($options, @_) }, next;
/^--curl/ and $urpm->{sync} = \&urpm::sync_webfetch, next;
/^--proxy$/ and do {
- my ($proxy, $port) = ($_ = shift @_) =~ m,^(http://[^:]+(:\d+)?)/*$, or
+ my ($proxy, $port) = ($_ = shift @_) =~ m,^(?:http://)?([^:]+(:\d+)?)/*$, or
die _("bad proxy declaration on command line\n");
$proxy .= ":1080" unless $port;
$urpm->{proxy}{http_proxy} = $proxy;
diff --git a/urpmi.spec b/urpmi.spec
index 308c09ef..fa8d1795 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -2,7 +2,7 @@
Name: urpmi
Version: 4.0
-Release: 12mdk
+Release: 13mdk
License: GPL
Source0: %{name}.tar.bz2
Source1: %{name}.logrotate
@@ -202,6 +202,10 @@ fi
%changelog
+* Thu Sep 5 2002 François Pons <fpons@mandrakesoft.com> 4.0-13mdk
+- simplified --proxy usage (http:// leading now optional).
+- fixed --proxy and --proxy-user or urpmq.
+
* Thu Sep 5 2002 François Pons <fpons@mandrakesoft.com> 4.0-12mdk
- fixed bad englist message.
- updated translation.
diff --git a/urpmi.update b/urpmi.update
index 4a516824..e9c5a32d 100755
--- a/urpmi.update
+++ b/urpmi.update
@@ -41,7 +41,7 @@ sub main {
urpm::sync_webfetch($options, @_) }, next;
/^--curl/ and $urpm->{sync} = \&urpm::sync_webfetch, next;
/^--proxy$/ and do {
- my ($proxy, $port) = ($_ = shift @_) =~ m,^(http://[^:]+(:\d+)?)/*$, or
+ my ($proxy, $port) = ($_ = shift @_) =~ m,^(?:http://)?([^:]+(:\d+)?)/*$, or
die _("bad proxy declaration on command line\n");
$proxy .= ":1080" unless $port;
$urpm->{proxy}{http_proxy} = $proxy;
diff --git a/urpmq b/urpmq
index 04a486ee..e8438013 100755
--- a/urpmq
+++ b/urpmq
@@ -101,17 +101,19 @@ for (@ARGV) {
urpm::sync_webfetch($options, @_) }; next };
/^--curl$/ and do { $urpm->{sync} = \&urpm::sync_webfetch; next };
/^--proxy$/ and do {
- ($_ = shift @_) =~ m,^http://([^:]+)(:([\d]+)|[^:])$, or usage;
- $_ .= ":1080" if /[^\d]/;
- $urpm->{proxy}->{http_proxy} = $_;
- next;
- };
+ my ($proxy, $port) = ($_ = shift @ARGV) =~ m,^(?:http://)?([^:]+(:\d+)?)/*$, or
+ die _("bad proxy declaration on command line\n");
+ $proxy .= ":1080" unless $port;
+ $urpm->{proxy}{http_proxy} = "http://$proxy";
+ next;
+ };
/^--proxy-user$/ and do {
- ($_ = shift @_) =~ /(.+):(.+)/, or usage;
- $urpm->{proxy}->{user} = $1;
- $urpm->{proxy}->{pwd} = $2;
- next;
- };
+ ($_ = shift @ARGV) =~ /(.+):(.+)/, or
+ die _("bad proxy declaration on command line\n");
+ $urpm->{proxy}{user} = $1;
+ $urpm->{proxy}{pwd} = $2;
+ next;
+ };
/^-(.*)$/ and do { foreach (split //, $1) {
/[\?h]/ and do { usage; next };
/d/ and do { $query->{deps} = 1; next };