summaryrefslogtreecommitdiffstats
path: root/urpm/get_pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-11-15 13:06:14 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-11-15 13:06:14 +0000
commit23e8d887e8ca41947f5b0870bb99dfb8da5c6fa2 (patch)
tree292fb14f01b7fad2a50b9def2a75b834a92e91b2 /urpm/get_pkgs.pm
parent930f9483e0e230796f86f7004d3aa289b667230b (diff)
downloadurpmi-23e8d887e8ca41947f5b0870bb99dfb8da5c6fa2.tar
urpmi-23e8d887e8ca41947f5b0870bb99dfb8da5c6fa2.tar.gz
urpmi-23e8d887e8ca41947f5b0870bb99dfb8da5c6fa2.tar.bz2
urpmi-23e8d887e8ca41947f5b0870bb99dfb8da5c6fa2.tar.xz
urpmi-23e8d887e8ca41947f5b0870bb99dfb8da5c6fa2.zip
- urpmi:
o fix "urpmi --install-src" (regression introduced in 4.10.9) nb: packages_by_name can't be used here since $urpm->{provides} doesn't have src.rpm so a full search is needed
Diffstat (limited to 'urpm/get_pkgs.pm')
-rw-r--r--urpm/get_pkgs.pm10
1 files changed, 9 insertions, 1 deletions
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,