diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-05-27 21:33:56 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-05-27 21:33:56 +0000 |
commit | cd195b669c1c3462ec7ff95f500c91b9b1f5d4fd (patch) | |
tree | 40086e531c21d1fd480a8ea1070bcb888a7644d5 /usr.sbin | |
parent | 873c5f1fe19d81736b551bedbb40e20a31e17062 (diff) |
group packing-list validation for replaced packages with added one.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Replace.pm | 11 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 7 |
2 files changed, 7 insertions, 11 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Replace.pm b/usr.sbin/pkg_add/OpenBSD/Replace.pm index 22958136d4c..7d5b706cba5 100644 --- a/usr.sbin/pkg_add/OpenBSD/Replace.pm +++ b/usr.sbin/pkg_add/OpenBSD/Replace.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Replace.pm,v 1.18 2007/05/26 23:45:44 espie Exp $ +# $OpenBSD: Replace.pm,v 1.19 2007/05/27 21:33:55 espie Exp $ # # Copyright (c) 2004-2006 Marc Espie <espie@openbsd.org> # @@ -254,15 +254,6 @@ sub can_do } } - if ($state->{okay}) { - try { - OpenBSD::Delete::validate_plist($plist, $state); - } catchall { - Warn "$_"; - return 0; - }; - } - return $state->{okay} ? $plist : 0; } diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index 049928e25d1..ba18772e41c 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.277 2007/05/27 11:36:21 espie Exp $ +# $OpenBSD: pkg_add,v 1.278 2007/05/27 21:33:55 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -336,6 +336,11 @@ sub really_add } print "\n"; } + if (@toreplace) { + for my $old (@toreplace) { + OpenBSD::Delete::validate_plist($old, $state); + } + } my $totsize = OpenBSD::Add::validate_plist($plist, $state); OpenBSD::Vstat::synchronize(); |