summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsturm <sturm@openbsd.org>2004-01-27 17:47:45 +0000
committersturm <sturm@openbsd.org>2004-01-27 17:47:45 +0000
commit0e61111f399425b7f202713617d9f3c20adbcd4a (patch)
tree136f10fd8641b68163055c892698e358daea3a13
parentthis part is not needed for sierra wireless (diff)
downloadwireguard-openbsd-0e61111f399425b7f202713617d9f3c20adbcd4a.tar.xz
wireguard-openbsd-0e61111f399425b7f202713617d9f3c20adbcd4a.zip
Don't just detect errors in pre_add(), but exit. Gets rid of strange
error messages if a dependency cannot be installed. found by naddy@, ok espie@
-rw-r--r--usr.sbin/pkg_add/pkg_add8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index 5df10d1fabd..8770715c4e9 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.24 2004/01/27 14:50:52 espie Exp $
+# $OpenBSD: pkg_add,v 1.25 2004/01/27 17:47:45 sturm Exp $
#
# Copyright (c) 2003 Marc Espie.
#
@@ -448,7 +448,11 @@ while (my $pkg = shift @todo) {
$cache->{$pkg} = pre_add($pkg, $opt_n);
}
my $handle = $cache->{$pkg};
- next unless defined $handle;
+ if ($errors > 0) {
+ last unless defined $handle;
+ } else {
+ next unless defined $handle;
+ }
my $plist = $handle->{plist};