aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--URPM/Resolve.pm13
1 files changed, 8 insertions, 5 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 2621928..393ceff 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -130,11 +130,12 @@ my %installed_arch;
#- side-effects: none (but uses a cache)
sub strict_arch_check_installed {
my ($db, $pkg) = @_;
- if ($pkg->arch ne 'src' && $pkg->arch ne 'noarch') {
+ my $arch = $pkg->arch;
+ if ($arch ne 'src' && $arch ne 'noarch') {
my $n = $pkg->name;
defined $installed_arch{$n} or $installed_arch{$n} = get_installed_arch($db, $n);
if ($installed_arch{$n} && $installed_arch{$n} ne 'noarch') {
- $pkg->arch eq $installed_arch{$n} or return;
+ $arch eq $installed_arch{$n} or return;
}
}
1;
@@ -146,9 +147,11 @@ sub strict_arch_check_installed {
#- side-effects: none
sub strict_arch_check {
my ($installed_pkg, $pkg) = @_;
- if ($pkg->arch ne 'src' && $pkg->arch ne 'noarch') {
- if ($installed_pkg->arch ne 'noarch') {
- $pkg->arch eq $installed_pkg->arch or return;
+ my $arch = $pkg->arch;
+ if ($arch ne 'src' && $arch ne 'noarch') {
+ my $inst_arch = $installed_pkg->arch;
+ if ($inst_arch ne 'noarch') {
+ $arch eq $inst_arch or return;
}
}
1;