From 94e795b83d3af4fc56e4a777fe6daf9da34b0ac9 Mon Sep 17 00:00:00 2001 From: espie Date: Tue, 12 Jan 2010 20:14:09 +0000 Subject: allow 'update-only' installs --- usr.sbin/pkg_add/pkg_add | 10 ++++++++-- 1 file 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 # @@ -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) { -- cgit v1.2.3-59-g8ed1b