summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2005-08-16 16:15:29 +0000
committerMarc Espie <espie@cvs.openbsd.org>2005-08-16 16:15:29 +0000
commit93bd61f7b2643d49799f3b432837415787bc3490 (patch)
tree9ba06a18a1c0f4d970b03643ab93bbdbfdba2edf /usr.sbin/pkg_add
parentd8b40bec45fba475959e014564e321e5ed1c554a (diff)
put a signature check way earlier, so that user doesn't get confused
seeing update messages for stuff that won't happen anyways.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/pkg_add8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index 2adec620675..1b9462dd91d 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.183 2005/08/16 13:52:15 espie Exp $
+# $OpenBSD: pkg_add,v 1.184 2005/08/16 16:15:28 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -87,6 +87,12 @@ sub can_install($$$)
require OpenBSD::Update;
+ if (is_installed($plist->pkgname()) && !$state->{forced}->{installed}) {
+ if (!OpenBSD::Update::is_needed($plist, $state)) {
+ $state->{installed}->{$pkgname} = 1;
+ return undef;
+ }
+ }
if (!OpenBSD::Update::is_safe($plist, $state)) {
print "Can't safely update to $pkgname\n";
$errors++;