diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-28 11:49:06 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-28 11:49:06 +0000 |
commit | a0c167908bc5dc7005146037b583a3ab4c6ce741 (patch) | |
tree | d388b7343e7da29ad0db8891a116ef556b79be0c /URPM | |
parent | b0000f628fc9dbbf4c80697e4315f727cad3e657 (diff) | |
download | perl-URPM-a0c167908bc5dc7005146037b583a3ab4c6ce741.tar perl-URPM-a0c167908bc5dc7005146037b583a3ab4c6ce741.tar.gz perl-URPM-a0c167908bc5dc7005146037b583a3ab4c6ce741.tar.bz2 perl-URPM-a0c167908bc5dc7005146037b583a3ab4c6ce741.tar.xz perl-URPM-a0c167908bc5dc7005146037b583a3ab4c6ce741.zip |
- package promotion must respect strict_arch
Diffstat (limited to 'URPM')
-rw-r--r-- | URPM/Resolve.pm | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 8a1d057..a6ef9d0 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -90,6 +90,16 @@ sub strict_arch_check_installed { } 1; } +sub strict_arch_check { + my ($installed_pkg, $pkg) = @_; + if ($pkg->arch ne 'src' && $pkg->arch ne 'noarch') { + my $n = $pkg->name; + if ($installed_pkg->arch ne 'noarch') { + $pkg->arch eq $installed_pkg->arch or return; + } + } + 1; +} sub _is_selected_or_installed { my ($urpm, $db, $name) = @_; @@ -1026,6 +1036,7 @@ sub _handle_diff_provides { @packages = grep { ($_->name eq $p->name ? $_->fullname ne $p->fullname : $_->obsoletes_overlap($p->name . " == " . $p->epoch . ":" . $p->version . "-" . $p->release)) + && (!strict_arch($urpm) || strict_arch_check($p, $_)) && _no_unsatisfied_requires($urpm, $db, $state, $_, $n) } @packages; @@ -1036,8 +1047,9 @@ sub _handle_diff_provides { && $_->is_arch_compat && !exists $state->{rejected}->{$_->fullname} && $_->obsoletes_overlap($p->name . " == " . $p->epoch . ":" . $p->version . "-" . $p->release) - && $_->fullname ne $p->fullname && - _no_unsatisfied_requires($urpm, $db, $state, $_, $n); + && $_->fullname ne $p->fullname + && (!strict_arch($urpm) || strict_arch_check($p, $_)) + && _no_unsatisfied_requires($urpm, $db, $state, $_, $n); } @packages; } |