summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorhubertf <hubertf>2000-02-26 21:58:55 +0000
committerhubertf <hubertf>2000-02-26 21:58:55 +0000
commit19956d1837b1120d48570f3c0ef260a18dea2ba7 (patch)
tree36b8414001bcfac25834887396d3e8b6cfc795b4 /mk
parent3572a4c638f2cc160efc29bb79f034889ced00db (diff)
downloadpkgsrc-19956d1837b1120d48570f3c0ef260a18dea2ba7.tar.gz
Also remove pkgs installed via BUILD_DEPENDS, they are not noted in the
installed pkg and this won't be caught by "pkg_delete -r". There are still situations where pkgs can be left behind if they were pulled in as BUILD_DEPENDS of any depends installed via the "depends" target. Maybe Makefile-level recursion should be used instead of "pkg_delete -r" to implement this...
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk13
1 files changed, 12 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 46987695223..1827c033c29 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.407 2000/02/25 05:46:27 hubertf Exp $
+# $NetBSD: bsd.pkg.mk,v 1.408 2000/02/26 21:58:55 hubertf Exp $
#
# This file is in the public domain.
#
@@ -1730,6 +1730,17 @@ root-deinstall:
${ECHO} Running ${PKG_DELETE} ${root-install-flags} $$found ; \
${PKG_DELETE} ${root-install-flags} $$found || ${TRUE} ; \
fi
+.if (${DEINSTALLDEPENDS} != "NO")
+ @${SHCOMMENT} Also remove BUILD_DEPENDS:
+.for pkg in ${BUILD_DEPENDS:C/:.*$//}
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ found=`${PKG_INFO} -e "${pkg}" || ${TRUE}` ; \
+ if [ "$$found" != "" ]; then \
+ ${ECHO} Running ${PKG_DELETE} $$found ; \
+ ${PKG_DELETE} $$found || ${TRUE} ; \
+ fi
+.endfor
+.endif # DEINSTALLDEPENDS
@${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE}
.endif # target(deinstall)