pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk In the overwrite package case:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5a47efb5b2d2
branches:  trunk
changeset: 463659:5a47efb5b2d2
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sun Nov 23 07:14:43 2003 +0000

description:
In the overwrite package case:

   * Ensure that VIEW-INSTALL is called after _all_ POST-INSTALL actions
     (including any in the INSTALL_EXTRA_TMPL file) by moving the call to
     a file that is included after all other INSTALL templates.

   * Ensure that VIEW-DEINSTALL is called before _all_ DEINSTALL actions
     (including any in the DEINSTALL_EXTRA_TMPL file) by moving the call to
     a file that is included before all other DEINSTALL templates.

diffstat:

 mk/bsd.pkg.install.mk    |   6 +++++-
 mk/install/deinstall     |   7 +------
 mk/install/deinstall-pre |  18 ++++++++++++++++++
 mk/install/install       |   6 +-----
 mk/install/install-post  |  18 ++++++++++++++++++
 5 files changed, 43 insertions(+), 12 deletions(-)

diffs (127 lines):

diff -r fdf4a99e743a -r 5a47efb5b2d2 mk/bsd.pkg.install.mk
--- a/mk/bsd.pkg.install.mk     Sun Nov 23 07:14:09 2003 +0000
+++ b/mk/bsd.pkg.install.mk     Sun Nov 23 07:14:43 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.install.mk,v 1.52 2003/09/17 02:38:22 jlam Exp $
+# $NetBSD: bsd.pkg.install.mk,v 1.53 2003/11/23 07:14:43 jlam Exp $
 #
 # This Makefile fragment is included by package Makefiles to use the common
 # INSTALL/DEINSTALL scripts.  To use this Makefile fragment, simply:
@@ -30,10 +30,12 @@
 .else
 HEADER_EXTRA_TMPL?=    # empty
 .endif
+DEINSTALL_PRE_TMPL?=   ${.CURDIR}/../../mk/install/deinstall-pre
 DEINSTALL_EXTRA_TMPL?= # empty
 DEINSTALL_TMPL?=       ${.CURDIR}/../../mk/install/deinstall
 INSTALL_TMPL?=         ${.CURDIR}/../../mk/install/install
 INSTALL_EXTRA_TMPL?=   # empty
+INSTALL_POST_TMPL?=    ${.CURDIR}/../../mk/install/install-post
 _FOOTER_TMPL?=         ${.CURDIR}/../../mk/install/footer
 
 # DEINSTALL_TEMPLATES and INSTALL_TEMPLATES are the default list of source
@@ -41,6 +43,7 @@
 #
 DEINSTALL_TEMPLATES=   ${_HEADER_TMPL}
 DEINSTALL_TEMPLATES+=  ${HEADER_EXTRA_TMPL}
+DEINSTALL_TEMPLATES+=  ${DEINSTALL_PRE_TMPL}
 DEINSTALL_TEMPLATES+=  ${DEINSTALL_EXTRA_TMPL}
 DEINSTALL_TEMPLATES+=  ${DEINSTALL_TMPL}
 DEINSTALL_TEMPLATES+=  ${_FOOTER_TMPL}
@@ -48,6 +51,7 @@
 INSTALL_TEMPLATES+=    ${HEADER_EXTRA_TMPL}
 INSTALL_TEMPLATES+=    ${INSTALL_TMPL}
 INSTALL_TEMPLATES+=    ${INSTALL_EXTRA_TMPL}
+INSTALL_TEMPLATES+=    ${INSTALL_POST_TMPL}
 INSTALL_TEMPLATES+=    ${_FOOTER_TMPL}
 
 # These are the list of source files that are concatenated to form the
diff -r fdf4a99e743a -r 5a47efb5b2d2 mk/install/deinstall
--- a/mk/install/deinstall      Sun Nov 23 07:14:09 2003 +0000
+++ b/mk/install/deinstall      Sun Nov 23 07:14:43 2003 +0000
@@ -1,6 +1,6 @@
 # start of deinstall
 #
-# $NetBSD: deinstall,v 1.24 2003/11/21 10:54:14 jlam Exp $
+# $NetBSD: deinstall,v 1.25 2003/11/23 07:14:43 jlam Exp $
 
 eval set -- ${PKG_USERS}
 for userset; do
@@ -101,11 +101,6 @@
        ;;
 
 DEINSTALL)
-       if [ "${PKG_INSTALLATION_TYPE}" = "overwrite" ]; then
-               ${SETENV} PKG_PREFIX="${PKG_PREFIX}" \
-                       $0 ${PKGNAME} VIEW-DEINSTALL
-       fi
-
        # Remove configuration files if they don't differ from the default
        # config file.
        #
diff -r fdf4a99e743a -r 5a47efb5b2d2 mk/install/deinstall-pre
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/install/deinstall-pre  Sun Nov 23 07:14:43 2003 +0000
@@ -0,0 +1,18 @@
+# start of deinstall-pre
+#
+# $NetBSD: deinstall-pre,v 1.1 2003/11/23 07:14:43 jlam Exp $
+
+# Ensure that the VIEW-DEINSTALL action is called for overwrite packages.
+# This is here to ensure that it's the first DEINSTALL action (before
+# any DEINSTALL_EXTRA_TMPL DEINSTALL actions).
+#
+case ${STAGE} in
+DEINSTALL)
+       if [ "${PKG_INSTALLATION_TYPE}" = "overwrite" ]; then
+               ${SETENV} PKG_PREFIX="${PKG_PREFIX}" \
+                       $0 ${PKGNAME} VIEW-DEINSTALL
+        fi
+       ;;
+esac
+
+# end of deinstall-pre
diff -r fdf4a99e743a -r 5a47efb5b2d2 mk/install/install
--- a/mk/install/install        Sun Nov 23 07:14:09 2003 +0000
+++ b/mk/install/install        Sun Nov 23 07:14:43 2003 +0000
@@ -1,6 +1,6 @@
 # start of install
 #
-# $NetBSD: install,v 1.27 2003/11/21 10:32:25 jlam Exp $
+# $NetBSD: install,v 1.28 2003/11/23 07:14:43 jlam Exp $
 
 if [ -z "${CONF_FILES}" -a -z "${CONF_FILES_PERMS}" -a                 \
      -z "${SUPPORT_FILES}" -a -z "${SUPPORT_FILES_PERMS}" -o           \
@@ -386,10 +386,6 @@
 EOF
                fi
        fi
-       if [ "${PKG_INSTALLATION_TYPE}" = "overwrite" ]; then
-               ${SETENV} PKG_PREFIX="${PKG_PREFIX}" \
-                       $0 ${PKGNAME} VIEW-INSTALL
-       fi
        ;;
 
 VIEW-INSTALL)
diff -r fdf4a99e743a -r 5a47efb5b2d2 mk/install/install-post
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/install/install-post   Sun Nov 23 07:14:43 2003 +0000
@@ -0,0 +1,18 @@
+# start of install-post
+#
+# $NetBSD: install-post,v 1.1 2003/11/23 07:14:43 jlam Exp $
+
+# Ensure that the VIEW-INSTALL action is called for overwrite packages.
+# This is here to ensure that it's the final POST-INSTALL action (after
+# any INSTALL_EXTRA_TMPL POST-INSTALL actions).
+#
+case ${STAGE} in
+POST-INSTALL)
+       if [ "${PKG_INSTALLATION_TYPE}" = "overwrite" ]; then
+               ${SETENV} PKG_PREFIX="${PKG_PREFIX}" \
+                       $0 ${PKGNAME} VIEW-INSTALL
+        fi
+       ;;
+esac
+
+# end of install-post



Home | Main Index | Thread Index | Old Index