diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-05-30 14:10:09 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-05-30 14:10:09 +0000 |
commit | cedcd4e23b346b89ef1ae8e669c95803c19d1f9d (patch) | |
tree | 1a93a9d646b1d5e2b3ca49a3f5deb91f137aa5e8 /usr.sbin | |
parent | e56a906b41f6a38ce9beeb3f0208dc449668f3ba (diff) |
fold even more stuff under the same control loop.
Diffstat (limited to 'usr.sbin')
-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", |