diff options
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PkgAdd.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgAdd.pm | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm index 31b381f2f73..9e378f63b28 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgAdd.pm,v 1.57 2014/02/03 13:47:20 espie Exp $ +# $OpenBSD: PkgAdd.pm,v 1.58 2014/02/04 00:14:27 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org> # @@ -843,7 +843,15 @@ sub newer_has_errors $state->tracker->cant($set); return 1; } + } + return 0; +} +sub newer_is_bad_arch +{ + my ($set, $state) = @_; + + for my $handle ($set->newer) { if ($handle->plist->has('arch')) { unless ($handle->plist->{arch}->check($state->{arch})) { $state->set_name_from_handle($handle); @@ -878,6 +886,10 @@ sub process_set $set->figure_out_kept($state); + if (newer_has_errors($set, $state)) { + return (); + } + my @deps = $set->solver->solve_depends($state); if ($state->verbose >= 2) { $set->solver->dump($state); @@ -896,6 +908,10 @@ sub process_set return (); } + if (newer_is_bad_arch($set, $state)) { + return (); + } + if ($set->older_to_do) { my $r = $set->check_forward_dependencies($state); if (!defined $r) { |