summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorjoerg <joerg>2008-02-08 00:58:17 +0000
committerjoerg <joerg>2008-02-08 00:58:17 +0000
commit7332897ff5cb05a90690aee6aa66d7ff526ceba6 (patch)
tree711ae0c22bab9c7ae0c5447850a98ea64eceee3e /pkgtools
parentf4b1f8f9e0f862a81125cf99da260443da0c2599 (diff)
downloadpkgsrc-7332897ff5cb05a90690aee6aa66d7ff526ceba6.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.c10
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 */
}