aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-28 12:13:10 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-28 12:13:10 +0000
commitebd41decff0fdcc43f6d34beef265720a0025f53 (patch)
treebf93370129bb7b297dc590dfc7341475f4e808f1
parent08343d190097b773eb1af0296ba14e4c7883cd0c (diff)
downloadrpmdrake-ebd41decff0fdcc43f6d34beef265720a0025f53.tar
rpmdrake-ebd41decff0fdcc43f6d34beef265720a0025f53.tar.gz
rpmdrake-ebd41decff0fdcc43f6d34beef265720a0025f53.tar.bz2
rpmdrake-ebd41decff0fdcc43f6d34beef265720a0025f53.tar.xz
rpmdrake-ebd41decff0fdcc43f6d34beef265720a0025f53.zip
Handle virtual media correctly
-rwxr-xr-xrpmdrake10
1 files changed, 7 insertions, 3 deletions
diff --git a/rpmdrake b/rpmdrake
index f3249782..b03a336e 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -365,7 +365,8 @@ sub extract_header {
changelog => $chg_prepro->(to_utf8(scalar(`rpm -q --changelog $name`))) });
} else {
my ($p, $medium) = ($pkg->{pkg}, pkg2medium($pkg->{pkg}, $urpm));
- my $hdlist = "$urpm->{statedir}/$medium->{hdlist}";
+ my $hdlist = $medium->{virtual} ? "$medium->{url}/$medium->{with_hdlist}" : "$urpm->{statedir}/$medium->{hdlist}";
+ $hdlist =~ s/^file:\/+//;
if (-r $hdlist) {
standalone::explanations("Extracting header of " . $p->header_filename . " from $hdlist");
my $packer;
@@ -434,8 +435,11 @@ sub do_search($$$$$$$) {
);
}
} else {
- my @hdlists = map { my $h = "$urpm->{statedir}/$_->{hdlist}";
- if_(!$_->{ignore} && ($MODE ne 'update' || $_->{update}) && -r $h, $h) } @{$urpm->{media}};
+ my @hdlists = map {
+ my $h = $_->{virtual} ? "$_->{url}/$_->{with_hdlist}" : "$urpm->{statedir}/$_->{hdlist}";
+ $h =~ s/^file:\/+//;
+ if_(!$_->{ignore} && ($MODE ne 'update' || $_->{update}) && -r $h, $h);
+ } @{$urpm->{media}};
my $total_size = sum(
map {
my $pack;