summaryrefslogtreecommitdiffstats
path: root/urpmq
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-07-27 06:06:53 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-07-27 06:06:53 +0000
commit21b7551db1452f05322209b8f4d9c9064e8eefeb (patch)
tree65dd67813c365195cbe866198219613ad8e1c13e /urpmq
parentee5df142c4a44ab7bdd50f675f558e7b87713c8d (diff)
downloadurpmi-21b7551db1452f05322209b8f4d9c9064e8eefeb.tar
urpmi-21b7551db1452f05322209b8f4d9c9064e8eefeb.tar.gz
urpmi-21b7551db1452f05322209b8f4d9c9064e8eefeb.tar.bz2
urpmi-21b7551db1452f05322209b8f4d9c9064e8eefeb.tar.xz
urpmi-21b7551db1452f05322209b8f4d9c9064e8eefeb.zip
Make the leading "file://" optional in local media URLs.
Diffstat (limited to 'urpmq')
-rwxr-xr-xurpmq4
1 files changed, 2 insertions, 2 deletions
diff --git a/urpmq b/urpmq
index 77d27984..476b8224 100755
--- a/urpmq
+++ b/urpmq
@@ -311,7 +311,7 @@ if ($urpm::args::options{list_aliases}) {
require packdrake;
my $packer = new packdrake(
$urpm->{media}[$_]{virtual} ?
- ("$urpm->{media}[$_]{url}/$urpm->{media}[$_]{with_hdlist}" =~ m!^file:/*(/.*)!)[0] :
+ ("$urpm->{media}[$_]{url}/$urpm->{media}[$_]{with_hdlist}" =~ m!^(?:file:/*)?(/[^/].*)!)[0] :
"$urpm->{statedir}/$urpm->{media}[$_]{hdlist}");
$packer->extract_archive(undef, @headers);
} else {
@@ -339,7 +339,7 @@ if ($urpm::args::options{list_aliases}) {
require packdrake;
my $packer = new packdrake(
$urpm->{media}[$_]{virtual} ?
- ("$urpm->{media}[$_]{url}/$urpm->{media}[$_]{with_hdlist}" =~ m!^file:/*(/.*)!)[0] :
+ ("$urpm->{media}[$_]{url}/$urpm->{media}[$_]{with_hdlist}" =~ m!^(?:file:/*)?(/[^/].*)!)[0] :
"$urpm->{statedir}/$urpm->{media}[$_]{hdlist}");
$packer->extract_archive($< == 0 ? "$urpm->{cachedir}/headers" : $tmp_header_dir, @headers);
} elsif (!%downloads) {