aboutsummaryrefslogtreecommitdiffstats
path: root/URPM/Resolve.pm
diff options
context:
space:
mode:
Diffstat (limited to 'URPM/Resolve.pm')
-rw-r--r--URPM/Resolve.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 5190ad3..de850c2 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -72,7 +72,9 @@ sub find_chosen_packages {
if ($strict_arch && $pkg->arch ne 'src' && $pkg->arch ne 'noarch') {
my $n = $pkg->name;
defined $installed_arch{$n} or $installed_arch{$n} = get_installed_arch($db, $n);
- $installed_arch{$n} && $pkg->arch ne $installed_arch{$n} and next;
+ if ($installed_arch{$n} && $installed_arch{$n} ne 'noarch') {
+ $pkg->arch eq $installed_arch{$n} or next;
+ }
}
if (my $p = $packages{$pkg->name}) {
$pkg->flag_requested > $p->flag_requested ||
@@ -325,6 +327,8 @@ sub backtrack_selected {
}
}
#- the package is already rejected, we assume we can add another reason here!
+ $urpm->{debug_URPM}("adding a reason to already rejected package " . $dep->{from}->fullname . ": unsatisfied " . $dep->{required}) if $urpm->{debug_URPM};
+
push @{$state->{rejected}{$dep->{from}->fullname}{backtrack}{unsatisfied}}, $dep->{required};
}
}
@@ -373,6 +377,8 @@ sub resolve_rejected {
my ($urpm, $db, $state, $pkg, %options) = @_;
my @unsatisfied;
+ $urpm->{debug_URPM}("resolve_rejected: " . $pkg->fullname) if $urpm->{debug_URPM};
+
#- check if the package has already been asked to be rejected (removed or obsoleted).
#- this means only add the new reason and return.
if (! $state->{rejected}{$pkg->fullname}) {
@@ -1107,7 +1113,7 @@ sub request_packages_to_upgrade {
#- first try with package using the same name.
#- this will avoid selecting all packages obsoleting an old one.
if (my $pkg = $names{$pn}) {
- unless ($pkg->flag_upgrade || $pkg->flag_installed) {
+ if (!$pkg->flag_upgrade && !$pkg->flag_installed) {
$pkg->set_flag_installed; #- there is at least one package installed (whatever its version).
$pkg->set_flag_upgrade;
}