aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2010-04-23 15:39:58 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2010-04-23 15:39:58 +0000
commit8285908fc9382cd8964a3a73341bff5058921fd9 (patch)
tree4c9d70b6810e9716ac257370b161ad4bccd649e9 /URPM
parent42dc66fa7e525a706739623a4dba22a1f05b22cd (diff)
downloadperl-URPM-8285908fc9382cd8964a3a73341bff5058921fd9.tar
perl-URPM-8285908fc9382cd8964a3a73341bff5058921fd9.tar.gz
perl-URPM-8285908fc9382cd8964a3a73341bff5058921fd9.tar.bz2
perl-URPM-8285908fc9382cd8964a3a73341bff5058921fd9.tar.xz
perl-URPM-8285908fc9382cd8964a3a73341bff5058921fd9.zip
honour search medias when using --auto-select
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Resolve.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index ceeda9f..f6aab2f 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -1674,7 +1674,6 @@ sub request_packages_to_upgrade {
$db->traverse(sub {
my ($pkg_installed) = @_;
my $name = $pkg_installed->name;
-
my $pkg;
if (exists $by_name{$name}) {
if (my $p = $by_name{$name}) {
@@ -1700,6 +1699,10 @@ sub request_packages_to_upgrade {
$pkg = undef;
}
}
+ if ($pkg && %options->{idlist} && !grep { $pkg->id == $_ } @{%options->{idlist}}) {
+ $urpm->{debug_URPM}("not auto-selecting $pkg->fullname because it's not in search medias");
+ $pkg = undef;
+ }
$pkg and $urpm->{debug_URPM}("auto-select: adding " . $pkg->fullname . " replacing " . $pkg_installed->fullname) if $urpm->{debug_URPM};