summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-04-21 09:57:23 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-04-21 09:57:23 +0000
commit9cc00c8a0fa1ee89e86e47e2976a92a0d872737e (patch)
tree351265b613ebc47030fc3efedb552b774e63e63d
parenta8c9dc09a1a63debc8ee2dda2888247d7b3a7ff9 (diff)
if running a full update, proceed if we can't find some packages.
-rw-r--r--usr.sbin/pkg_add/pkg_add11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index d4c012965d1..5cb0d6144fc 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.226 2007/04/15 10:17:29 espie Exp $
+# $OpenBSD: pkg_add,v 1.227 2007/04/21 09:57:22 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -761,9 +761,14 @@ if ($opt_u) {
my @cantupdate = OpenBSD::Update::find(\@ARGV, \@todo, $state);
if (@cantupdate > 0) {
print "Cannot find updates for ", join(' ', @cantupdate), "\n";
- unless ($state->{forced}->{alwaysupdate} ||
- OpenBSD::Interactive::confirm("Proceed", $state->{interactive}, 0)) {
+ if ($state->{forced}->{alwaysupdate} ||
+ $state->{full_update} && !$state->{interactive}) {
+ print "Proceeding anyways\n";
+ } else {
+ if (!OpenBSD::Interactive::confirm("Proceed",
+ $state->{interactive}, 0)) {
exit(1);
+ }
}
}
if (defined $state->{issues}) {