From 002fc172dd78b38485ab98082f5cbb136bb93469 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 3 Jan 2005 23:45:00 +0000 Subject: fix virtual hdlist check (when fetching headers) --- urpmq | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'urpmq') 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. -- cgit v1.2.1