From 38b5b656d8504e5a03d517ecb6166b110d5ffa07 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 15 Nov 2007 13:07:29 +0000 Subject: - urpmi: o fix "urpmi --install-src" (regression introduced in 4.10.9) (from trunk) --- urpm/get_pkgs.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'urpm/get_pkgs.pm') diff --git a/urpm/get_pkgs.pm b/urpm/get_pkgs.pm index 401faa30..e688bc74 100644 --- a/urpm/get_pkgs.pm +++ b/urpm/get_pkgs.pm @@ -59,7 +59,15 @@ sub selected2list { foreach my $id (values %fullname2id) { my $pkg = $urpm->{depslist}[$id]; my $fullname = $pkg->fullname; - my @pkgs = map { $_->id } grep { $fullname eq $_->fullname } $urpm->packages_by_name($pkg->name); + my @pkgs = $pkg->arch eq 'src' ? do { + # packages_by_name can't be used here since $urpm->{provides} doesn't have src.rpm + # so a full search is needed + my %requested; + urpm::select::search_packages($urpm, \%requested, [$pkg->name], src => 1); + map { split /\|/ } keys %requested; + } : do { + map { $_->id } grep { $fullname eq $_->fullname } $urpm->packages_by_name($pkg->name); + }; # id_map is a remapping of id. # it is needed because @list must be [ { id => pkg } ] where id is one the selected id, -- cgit v1.2.1