aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-03-06 13:48:52 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-03-06 13:48:52 +0000
commitea56f6b3a0360306e625d248632f93a4c7d4c145 (patch)
treed8f4d426ddd2d1f3a404ecf67d4cbf324f2f49a0 /URPM
parentbba907e94cfc249dff46b6863ecdee7be87b945e (diff)
downloadperl-URPM-ea56f6b3a0360306e625d248632f93a4c7d4c145.tar
perl-URPM-ea56f6b3a0360306e625d248632f93a4c7d4c145.tar.gz
perl-URPM-ea56f6b3a0360306e625d248632f93a4c7d4c145.tar.bz2
perl-URPM-ea56f6b3a0360306e625d248632f93a4c7d4c145.tar.xz
perl-URPM-ea56f6b3a0360306e625d248632f93a4c7d4c145.zip
simplify
Diffstat (limited to 'URPM')
-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;
}