diff options
author | 2007-05-30 14:10:08 +0000 | |
---|---|---|
committer | 2007-05-30 14:10:08 +0000 | |
commit | 7deaa16ce739dc7a7d6df2eee3597ba2568c8a8b (patch) | |
tree | 9a501fdc222082208b1a21e2f3c1e931829f7d97 | |
parent | simplify really_add to use real visitors for extraction and installation. (diff) | |
download | wireguard-openbsd-7deaa16ce739dc7a7d6df2eee3597ba2568c8a8b.tar.xz wireguard-openbsd-7deaa16ce739dc7a7d6df2eee3597ba2568c8a8b.zip |
fold even more stuff under the same control loop.
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index 0a63799ce94..8ba7a2fc2e3 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.293 2007/05/30 14:04:51 espie Exp $ +# $OpenBSD: pkg_add,v 1.294 2007/05/30 14:10:08 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -431,8 +431,12 @@ sub really_add try { do_script($plist, REQUIRE, $state, "INSTALL"); - do_script($plist, INSTALL, $state, "PRE-INSTALL"); - OpenBSD::Add::perform_installation($handle, $state); + do_script($plist, INSTALL, $state, "PRE-INSTALL") + unless $state->{interrupted}; + OpenBSD::Add::perform_installation($handle, $state) + unless $state->{interrupted}; + do_script($plist, INSTALL, $state, "POST-INSTALL") + unless $state->{interrupted}; } catchall { unless ($state->{interrupted}) { Warn $_; @@ -441,15 +445,6 @@ sub really_add }; OpenBSD::ProgressMeter::next(); - if (!($state->{interrupted} || $errors)) { - try { - do_script($plist, INSTALL, $state, "POST-INSTALL") - } catchall { - Warn $_; - $errors++; - }; - } - unlink($plist->infodir.CONTENTS); if ($state->{interrupted} || $errors) { Fatal partial_install("Installation of $pkgname failed", |