aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Resolve.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 4d634dd..3593c3b 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -240,6 +240,16 @@ sub find_required_package {
_set_flag_installed_and_upgrade_if_no_newer($db, $pkg);
}
+ #- if another package requires one of the potential candidates,
+ #- we select this candidate instead of keeping all the
+ #- other packages.
+ foreach my $pkg (@packages) {
+ exists $state->{whatrequires}->{$pkg->name} or next;
+ $urpm->{debug_URPM}("forcing use of " . $pkg->name . " for $id_prop because " . join(", ", map { $urpm->{depslist}[$_]->name } keys %{$state->{whatrequires}->{$pkg->name}}) . " require(s) it") if $urpm->{debug_URPM};
+
+ return [ $pkg ];
+ }
+
if (my @kernel_source = _find_required_package__kernel_source($urpm, $db, \@packages)) {
$urpm->{debug_URPM}("packageCallbackChoices: kernel source chosen " . join(",", map { $_->name } @kernel_source) . " in " . join(",", map { $_->name } @packages)) if $urpm->{debug_URPM};
return \@kernel_source, \@kernel_source;