pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/pkg_install-renovation]: pkgsrc/pkgtools/pkg_install/files/delete Cal...
details: https://anonhg.NetBSD.org/pkgsrc/rev/4a0d3214e96d
branches: pkg_install-renovation
changeset: 541587:4a0d3214e96d
user: joerg <joerg%pkgsrc.org@localhost>
date: Tue Aug 05 22:25:54 2008 +0000
description:
Call chmod directly and just use 555 for the deinstall script.
diffstat:
pkgtools/pkg_install/files/delete/perform.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r 46601aacc455 -r 4a0d3214e96d pkgtools/pkg_install/files/delete/perform.c
--- a/pkgtools/pkg_install/files/delete/perform.c Tue Aug 05 20:42:54 2008 +0000
+++ b/pkgtools/pkg_install/files/delete/perform.c Tue Aug 05 22:25:54 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.23.2.8 2008/08/05 20:41:04 joerg Exp $ */
+/* $NetBSD: perform.c,v 1.23.2.9 2008/08/05 22:25:54 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.15 1997/10/13 15:03:52 jkh Exp";
#else
-__RCSID("$NetBSD: perform.c,v 1.23.2.8 2008/08/05 20:41:04 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.23.2.9 2008/08/05 22:25:54 joerg Exp $");
#endif
#endif
@@ -740,7 +740,8 @@
"(arg: %s).\n", text, target);
} else {
pkgdir = xasprintf("%s/%s", _pkgdb_getPKGDB_DIR(), pkg);
- (void) fexec(CHMOD_CMD, "+x", fname, NULL); /* make sure */
+ if (chmod(fname, 0555))
+ warn("chmod of %s failed", fname);
if (fcexec(pkgdir, fname, pkg, target, NULL)) {
warnx("%s script returned error status", text);
if (!Force) {
@@ -804,7 +805,8 @@
printf("Would execute post-de-install script at this point (arg: POST-DEINSTALL).\n");
else {
pkgdir = xasprintf("%s/%s", _pkgdb_getPKGDB_DIR(), pkg);
- (void) fexec(CHMOD_CMD, "+x", fname, NULL); /* make sure */
+ if (chmod(fname, 0555))
+ warn("chmod of %s failed", fname);
if (fcexec(pkgdir, fname, pkg, "POST-DEINSTALL", NULL)) {
warnx("post-deinstall script returned error status");
if (!Force) {
Home |
Main Index |
Thread Index |
Old Index