summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2021-11-03 13:37:25 +0000
committerjperkin <jperkin@pkgsrc.org>2021-11-03 13:37:25 +0000
commit17e63855be45cf224c6862e8ed90191d542e6b88 (patch)
tree9edd21127305c04d0a48d3bdffc8f37c631c9946 /pkgtools
parent00130b4be75108b2eaa64535ee36ef91b62dc30a (diff)
downloadpkgsrc-17e63855be45cf224c6862e8ed90191d542e6b88.tar.gz
pkg_install: Add an explicit dummy DEINSTALL script.
Even with DEINSTALL_SRC set empty, changes in the pkgsrc infrastructure over the past few years will now create a dynamic +DEINSTALL script regardless, and while only containing "exit 0", may have a #! using a shell from pkgsrc. This can lead to upgrade issues if that shell happens to be unavailable while pkg_install is being upgraded. Creating our own dummy script that explicitly uses /bin/sh avoids that problem.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_install/DEINSTALL6
-rw-r--r--pkgtools/pkg_install/Makefile4
2 files changed, 8 insertions, 2 deletions
diff --git a/pkgtools/pkg_install/DEINSTALL b/pkgtools/pkg_install/DEINSTALL
new file mode 100644
index 00000000000..105841852c8
--- /dev/null
+++ b/pkgtools/pkg_install/DEINSTALL
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# Dummy script to ensure pkgsrc never creates its own DEINSTALL script for
+# this package that uses a pkgsrc shell, as that can cause upgrade issues.
+#
+exit 0
diff --git a/pkgtools/pkg_install/Makefile b/pkgtools/pkg_install/Makefile
index 21fe6c7e3ee..56224fa6ef5 100644
--- a/pkgtools/pkg_install/Makefile
+++ b/pkgtools/pkg_install/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.235 2021/06/05 14:17:32 nia Exp $
+# $NetBSD: Makefile,v 1.236 2021/11/03 13:37:25 jperkin Exp $
# Notes to package maintainers:
#
@@ -86,7 +86,7 @@ EGDIR= ${PREFIX}/share/examples/pkg_install
PLIST_SUBST+= PKG_DBDIR=${PKG_DBDIR}
-DEINSTALL_SRC= # empty
+DEINSTALL_SRC= ${PKGDIR}/DEINSTALL
INSTALL_SRC= ${PKGDIR}/INSTALL
FILES_SUBST+= PKG_DBDIR=${PKG_DBDIR} \
PKG_TOOLS_BIN=${PKG_TOOLS_BIN:Q} \