From 54d87f0171d26e88c36d3592c8bd5df5aa96ca5b Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Fri, 11 Feb 2005 09:55:13 +0000 Subject: Fix retrieval of source packages (e.g. urpmq --sources) with alternative dependencies foo|bar (Pascal Terjan) --- urpm.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/urpm.pm b/urpm.pm index 93f830b2..3fe7523f 100644 --- a/urpm.pm +++ b/urpm.pm @@ -2311,11 +2311,13 @@ sub get_source_packages { #- build association hash to retrieve id and examine all list files. foreach (keys %$packages) { - my $p = $urpm->{depslist}[$_]; - if ($urpm->{source}{$_}) { - $protected_files{$local_sources{$_} = $urpm->{source}{$_}} = undef; - } else { - $fullname2id{$p->fullname} = $_ . ''; + foreach (split /\|/, $_) { + if ($urpm->{source}{$_}) { + $protected_files{$local_sources{$_} = $urpm->{source}{$_}} = undef; + } else { + my $p = $urpm->{depslist}[$_]; + $fullname2id{$p->fullname} = $_ . ''; + } } } -- cgit v1.2.1