diff options
author | jlam <jlam@pkgsrc.org> | 2003-11-23 07:14:43 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2003-11-23 07:14:43 +0000 |
commit | e36b264d9d145965e3cb2ef8d1e78e777fe396c5 (patch) | |
tree | c208aee6f38a73fe2cc0863c78bf9907c1b269e6 /mk/install | |
parent | d474607ea12c2f434208348b599003ea45a5ad2a (diff) | |
download | pkgsrc-e36b264d9d145965e3cb2ef8d1e78e777fe396c5.tar.gz |
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 (limited to 'mk/install')
-rw-r--r-- | mk/install/deinstall | 7 | ||||
-rw-r--r-- | mk/install/deinstall-pre | 18 | ||||
-rw-r--r-- | mk/install/install | 6 | ||||
-rw-r--r-- | mk/install/install-post | 18 |
4 files changed, 38 insertions, 11 deletions
diff --git a/mk/install/deinstall b/mk/install/deinstall index 0fd570c3fc5..71bce248e18 100644 --- a/mk/install/deinstall +++ b/mk/install/deinstall @@ -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 @@ VIEW-DEINSTALL) ;; 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 --git a/mk/install/deinstall-pre b/mk/install/deinstall-pre new file mode 100644 index 00000000000..b3656bdf4e5 --- /dev/null +++ b/mk/install/deinstall-pre @@ -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 --git a/mk/install/install b/mk/install/install index 9554a456504..9a8f3f37983 100644 --- a/mk/install/install +++ b/mk/install/install @@ -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 EOF fi fi - if [ "${PKG_INSTALLATION_TYPE}" = "overwrite" ]; then - ${SETENV} PKG_PREFIX="${PKG_PREFIX}" \ - $0 ${PKGNAME} VIEW-INSTALL - fi ;; VIEW-INSTALL) diff --git a/mk/install/install-post b/mk/install/install-post new file mode 100644 index 00000000000..d8b25c5a021 --- /dev/null +++ b/mk/install/install-post @@ -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 |