summaryrefslogtreecommitdiffstats
path: root/urpm/get_pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-11-15 13:07:29 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-11-15 13:07:29 +0000
commit38b5b656d8504e5a03d517ecb6166b110d5ffa07 (patch)
tree8c06e4296437215a2b1c8ded6ec52b815deaf102 /urpm/get_pkgs.pm
parent61634a865e3f170fd2715f9069adc341bc7c8d0e (diff)
downloadurpmi-38b5b656d8504e5a03d517ecb6166b110d5ffa07.tar
urpmi-38b5b656d8504e5a03d517ecb6166b110d5ffa07.tar.gz
urpmi-38b5b656d8504e5a03d517ecb6166b110d5ffa07.tar.bz2
urpmi-38b5b656d8504e5a03d517ecb6166b110d5ffa07.tar.xz
urpmi-38b5b656d8504e5a03d517ecb6166b110d5ffa07.zip
- urpmi:
o fix "urpmi --install-src" (regression introduced in 4.10.9) (from trunk)
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,