From 19956d1837b1120d48570f3c0ef260a18dea2ba7 Mon Sep 17 00:00:00 2001 From: hubertf Date: Sat, 26 Feb 2000 21:58:55 +0000 Subject: 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... --- mk/bsd.pkg.mk | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'mk') 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) -- cgit v1.2.3