summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2010-01-12 20:14:09 +0000
committerespie <espie@openbsd.org>2010-01-12 20:14:09 +0000
commit94e795b83d3af4fc56e4a777fe6daf9da34b0ac9 (patch)
tree643502d3075951a8bc475d6d9c78ffe279c5612b
parentsync comment with reality, -f won't be documented. (diff)
downloadwireguard-openbsd-94e795b83d3af4fc56e4a777fe6daf9da34b0ac9.tar.xz
wireguard-openbsd-94e795b83d3af4fc56e4a777fe6daf9da34b0ac9.zip
allow 'update-only' installs
-rw-r--r--usr.sbin/pkg_add/pkg_add10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index 9113776674e..7c19bad1b4a 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.469 2010/01/12 10:57:05 espie Exp $
+# $OpenBSD: pkg_add,v 1.470 2010/01/12 20:14:09 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -324,7 +324,13 @@ sub install_issues
my @conflicts = $set->find_conflicts($state);
- return 0 if @conflicts == 0;
+ if (@conflicts == 0) {
+ if ($state->{defines}{update_only}) {
+ return "only update, no install";
+ } else {
+ return 0;
+ }
+ }
if (!$state->{allow_replacing}) {
if (grep { !/^.libs\d*\-/ && !/^partial\-/ } @conflicts) {