diff options
author | joerg <joerg@pkgsrc.org> | 2008-02-08 00:58:17 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2008-02-08 00:58:17 +0000 |
commit | e6206e80d6eaa01d3c0bf49d0e69d7d0c47600e9 (patch) | |
tree | 711ae0c22bab9c7ae0c5447850a98ea64eceee3e /pkgtools | |
parent | e08e39667b3795905e2c06ac83280a17a2fc4739 (diff) | |
download | pkgsrc-e6206e80d6eaa01d3c0bf49d0e69d7d0c47600e9.tar.gz |
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 (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkg_install/files/add/perform.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgtools/pkg_install/files/add/perform.c b/pkgtools/pkg_install/files/add/perform.c index a0b116d86ac..66d34420fdc 100644 --- a/pkgtools/pkg_install/files/add/perform.c +++ b/pkgtools/pkg_install/files/add/perform.c @@ -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 @@ pkg_do(const char *pkg, lpkg_head_t *pkgs) (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 */ } |