From 29176bc365b15fc05267eb92c8c04aacc9905079 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Mon, 21 Dec 2009 17:15:47 +0000 Subject: check new package later, after we're sure of the set. avoid asking the user for @exec twice, as noticed by kettenis@ --- usr.sbin/pkg_add/pkg_add | 10 +++++----- 1 file 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 # @@ -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) { -- cgit v1.2.3