diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2010-01-12 20:14:10 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2010-01-12 20:14:10 +0000 |
commit | 5a818b8db6873464ff11bf8be0150dbe560e8d4c (patch) | |
tree | 875fe86be4063d08fd3f20d37640160b7a0ed30c /usr.sbin | |
parent | 4328638c8cfbc2e91ed94dba78af375f8b68fc18 (diff) |
allow 'update-only' installs
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 10 |
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) { |