Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/pkgviews]: src/usr.sbin/pkg_install/view Don't exit after running the IN...



details:   https://anonhg.NetBSD.org/src/rev/38cdc8207ceb
branches:  pkgviews
changeset: 534277:38cdc8207ceb
user:      jlam <jlam%NetBSD.org@localhost>
date:      Thu Aug 28 00:57:15 2003 +0000

description:
Don't exit after running the INSTALL script.  We only want to do that if
the INSTALL script exits with an error code.

diffstat:

 usr.sbin/pkg_install/view/pkg_view.sh |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r e6a42736a921 -r 38cdc8207ceb usr.sbin/pkg_install/view/pkg_view.sh
--- a/usr.sbin/pkg_install/view/pkg_view.sh     Wed Aug 27 22:00:06 2003 +0000
+++ b/usr.sbin/pkg_install/view/pkg_view.sh     Thu Aug 28 00:57:15 2003 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: pkg_view.sh,v 1.1.2.34 2003/08/27 22:00:06 jlam Exp $
+# $NetBSD: pkg_view.sh,v 1.1.2.35 2003/08/28 00:57:15 jlam Exp $
 
 #
 # Copyright (c) 2001 Alistair G. Crooks.  All rights reserved.
@@ -222,7 +222,11 @@
                if [ -f ${pkg_dbdir}/$1/+INSTALL ]; then
                        $doit $chmodprog +x ${pkg_dbdir}/$1/+INSTALL
                        $doit $envprog -i PKG_PREFIX=${targetdir} ${pkg_dbdir}/$1/+INSTALL $1 VIEW-INSTALL
-                       exit $?
+                       ec=$?
+                       if [ $ec != 0 ]; then
+                               echo "pkg_view: install script returned an error." 1>&2
+                               exit $ec
+                       fi
                fi
                ;;
        check)



Home | Main Index | Thread Index | Old Index