summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-01-03 23:45:00 +0000
committerOlivier Blin <oblin@mandriva.org>2005-01-03 23:45:00 +0000
commit002fc172dd78b38485ab98082f5cbb136bb93469 (patch)
tree8af1c412990f1f4a78509b77d1a93312dc518e42
parentcbe2fa9531333458597301441ba24764e7a9f4c2 (diff)
downloadurpmi-002fc172dd78b38485ab98082f5cbb136bb93469.tar
urpmi-002fc172dd78b38485ab98082f5cbb136bb93469.tar.gz
urpmi-002fc172dd78b38485ab98082f5cbb136bb93469.tar.bz2
urpmi-002fc172dd78b38485ab98082f5cbb136bb93469.tar.xz
urpmi-002fc172dd78b38485ab98082f5cbb136bb93469.zip
fix virtual hdlist check (when fetching headers)
-rwxr-xr-xurpmq12
1 files changed, 5 insertions, 7 deletions
diff --git a/urpmq b/urpmq
index 8403516e..90825254 100755
--- a/urpmq
+++ b/urpmq
@@ -341,14 +341,12 @@ if ($urpm::args::options{list_aliases}) {
map { my $pkg = $urpm->{depslist}[$_];
$pkg && $pkg->header_filename } @selected))
{
- if (-s "$urpm->{statedir}/$urpm->{media}[$_]{hdlist}") {
+ my $hdlist_path = $urpm->{media}[$_]{virtual}
+ ? ("$urpm->{media}[$_]{url}/$urpm->{media}[$_]{with_hdlist}" =~ m!^(?:file:/*)?(/[^/].*)!)[0]
+ : "$urpm->{statedir}/$urpm->{media}[$_]{hdlist}";
+ if (-s $hdlist_path) {
require packdrake;
- my $packer = new packdrake(
- $urpm->{media}[$_]{virtual}
- ? ("$urpm->{media}[$_]{url}/$urpm->{media}[$_]{with_hdlist}" =~ m!^(?:file:/*)?(/[^/].*)!)[0]
- : "$urpm->{statedir}/$urpm->{media}[$_]{hdlist}",
- quiet => 1,
- );
+ my $packer = new packdrake($hdlist_path, quiet => 1);
$packer->extract_archive($tmp_header_dir, @headers);
} elsif (!%downloads) {
#- fallback to retrieve rpm package before, so that --headers will be ok.