diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2009-12-21 17:15:47 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2009-12-21 17:15:47 +0000 |
commit | 29176bc365b15fc05267eb92c8c04aacc9905079 (patch) | |
tree | 0b254ac21a2f63fa4de8bfef53305058afe16557 | |
parent | eea1d019fef1ad2a32dfb4ca0970bd9cba769cc9 (diff) |
check new package later, after we're sure of the set.
avoid asking the user for @exec twice, as noticed by kettenis@
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index afd334d8524..e1bba3b1be1 100644 --- a/usr.sbin/pkg_add/pkg_add +++ b/usr.sbin/pkg_add/pkg_add @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_add,v 1.433 2009/12/21 11:03:00 espie Exp $ +# $OpenBSD: pkg_add,v 1.434 2009/12/21 17:15:46 espie Exp $ # # Copyright (c) 2003-2009 Marc Espie <espie@openbsd.org> # @@ -246,10 +246,6 @@ sub can_install } - if (!$set->is_new_stuff_safe($state)) { - return 0; - } - my $later = 0; for my $toreplace (@conflicts) { if ($state->tracker->is_installed($toreplace)) { @@ -272,6 +268,10 @@ sub can_install return if $later; + if (!$set->is_new_stuff_safe($state)) { + return 0; + } + my $manual_install = 0; for my $old ($set->older) { |