summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2002-03-22 19:08:44 +0000
committertron <tron@pkgsrc.org>2002-03-22 19:08:44 +0000
commit105558c3517edcaa034afa01b579c6e20e79b55f (patch)
tree5b2bba908fdd461d26305a4f5c8499e44bf67fac /mk/bsd.pkg.mk
parentfb6848694b8d6915c464024d6e90779fa40f19f6 (diff)
downloadpkgsrc-105558c3517edcaa034afa01b579c6e20e79b55f.tar.gz
Remove depend directory file in "update" target if the deinstallation
fails because otherwise the next invokation of the "update" target will not attempt to remove the package again. Fix provided by Aaron J. Grier in PR pkg/15827.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk8
1 files changed, 5 insertions, 3 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 62cf2149916..bbd6a1686bc 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.951 2002/03/20 11:31:33 tron Exp $
+# $NetBSD: bsd.pkg.mk,v 1.952 2002/03/22 19:08:44 tron Exp $
#
# This file is in the public domain.
#
@@ -2559,8 +2559,10 @@ CLEAR_DIRLIST?= YES
update:
${_PKG_SILENT}${_PKG_DEBUG}${MAKE} ${MAKEFLAGS} ${DDIR}
- ${_PKG_SILENT}${_PKG_DEBUG} \
- ${MAKE} ${MAKEFLAGS} deinstall DEINSTALLDEPENDS=ALL
+ ${_PKG_SILENT}${_PKG_DEBUG}if ${PKG_INFO} -qe ${PKGBASE}; then \
+ ${MAKE} ${MAKEFLAGS} deinstall DEINSTALLDEPENDS=ALL \
+ || (${RM} ${DDIR} && ${FALSE}); \
+ fi
.endif
${_PKG_SILENT}${_PKG_DEBUG} \
${MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} KEEP_WRKDIR=YES \