pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files/add Having to wonder for 5m...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/296adffca41b
branches:  trunk
changeset: 538428:296adffca41b
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Fri Feb 08 00:58:17 2008 +0000

description:
Having to wonder for 5min why pkg_add would fail just to discover that
it couldn't exec the shell scripts due to mount -o noexec, make the
error message a bit more verbose.

diffstat:

 pkgtools/pkg_install/files/add/perform.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 705f73fafab0 -r 296adffca41b pkgtools/pkg_install/files/add/perform.c
--- a/pkgtools/pkg_install/files/add/perform.c  Thu Feb 07 23:40:52 2008 +0000
+++ b/pkgtools/pkg_install/files/add/perform.c  Fri Feb 08 00:58:17 2008 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: perform.c,v 1.69 2008/01/26 23:30:24 joerg Exp $       */
+/*     $NetBSD: perform.c,v 1.70 2008/02/08 00:58:17 joerg Exp $       */
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -14,7 +14,7 @@
 #if 0
 static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
 #else
-__RCSID("$NetBSD: perform.c,v 1.69 2008/01/26 23:30:24 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.70 2008/02/08 00:58:17 joerg Exp $");
 #endif
 #endif
 
@@ -817,8 +817,12 @@
                (void) fexec(CHMOD_CMD, "+x", INSTALL_FNAME, NULL);     /* make sure */
                if (Verbose)
                        printf("Running install with PRE-INSTALL for %s.\n", PkgName);
+               errno = 0;
                if (!Fake && fexec("./" INSTALL_FNAME, PkgName, "PRE-INSTALL", NULL)) {
-                       warnx("install script returned error status");
+                       if (errno != 0)
+                               warn("exec of install script failed");
+                       else
+                               warnx("install script returned error status");
                        errc = 1;
                        goto success;   /* nothing to uninstall yet */
                }



Home | Main Index | Thread Index | Old Index