summaryrefslogtreecommitdiff
path: root/mk/install/deinstall
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2003-09-17 02:38:22 +0000
committerjlam <jlam@pkgsrc.org>2003-09-17 02:38:22 +0000
commit399f83c52684953c1f0a9bb47fc6e1d31bf8e921 (patch)
tree075c2f5dda579f36707f768f171254501ff90c89 /mk/install/deinstall
parented80fbf036a40411e1b2b3b1334cbd555e4d6324 (diff)
downloadpkgsrc-399f83c52684953c1f0a9bb47fc6e1d31bf8e921.tar.gz
Introduce a new variable "CONF_DEPENDS" for pkgviews: a package's
config directory matches the config directory for the dependency listed in CONF_DEPENDS. Use symlinks to physically point the package's config directory to the dependency's config directory, and handle all of this in the INSTALL/DEINSTALL scripts. Also make the INSTALL/DEINSTALL scripts a bit smarter about not copying files and not removing files if the source and destination file locations point to the same thing.
Diffstat (limited to 'mk/install/deinstall')
-rw-r--r--mk/install/deinstall12
1 files changed, 10 insertions, 2 deletions
diff --git a/mk/install/deinstall b/mk/install/deinstall
index 84e70d14a3a..eed6f0533bc 100644
--- a/mk/install/deinstall
+++ b/mk/install/deinstall
@@ -1,6 +1,6 @@
# start of deinstall
#
-# $NetBSD: deinstall,v 1.21 2003/09/13 10:06:36 jlam Exp $
+# $NetBSD: deinstall,v 1.22 2003/09/17 02:38:29 jlam Exp $
eval set -- ${PKG_USERS}
for userset; do
@@ -116,7 +116,7 @@ DEINSTALL)
samplefile="$1"; file="$2"
shift; shift
- if [ "${file}" != "${samplefile}" -a \
+ if [ ! "${file}" -ef "${samplefile}" -a \
-e "${file}" -a -e "${samplefile}" ]; then
if ${CMP} -s "${file}" "${samplefile}"; then
${RM} -f "${file}"
@@ -138,6 +138,14 @@ POST-DEINSTALL)
fi
done
+ if [ "${PKG_INSTALLATION_TYPE}" = "pkgviews" -a \
+ "${_PKG_CONFIG}" = "YES" -a -n "${CONF_DEPENDS}" ]; then
+ if [ -h ${PKG_SYSCONFDIR} ]; then
+ ${RM} -f ${PKG_SYSCONFDIR}
+ fi
+ ${RMDIR} -p `${DIRNAME} ${PKG_SYSCONFDIR}` 2>/dev/null || ${TRUE}
+ fi
+
existing_dirs=''
eval set -- ${ALL_DIRS}
for dir; do