From 0b88ec16dcc978e777ddc4c9a82eb38fcda10f78 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Mon, 22 Apr 2013 22:13:14 +0000 Subject: [PATCH] Remove old links while creating the new packages Force creation of the symlink for pkgng to avoid failure if the link already exists Submitted by: ohauer@ --- Mk/bsd.pkgng.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Mk/bsd.pkgng.mk b/Mk/bsd.pkgng.mk index 1cd9a8f15c07..b5c0a27422d5 100644 --- a/Mk/bsd.pkgng.mk +++ b/Mk/bsd.pkgng.mk @@ -258,6 +258,9 @@ do-package: ${TMPPLIST} fi; \ fi; \ fi; + @for cat in ${CATEGORIES}; do \ + ${RM} -fv ${PACKAGES}/$$cat/${PKGNAMEPREFIX}${PORTNAME}*${PKG_SUFX} ; \ + done @if ${PKG_CREATE} -o ${PKGREPOSITORY} ${PKGNAME}; then \ if [ "${PKGORIGIN}" = "ports-mgmt/pkg" ]; then \ if [ ! -d ${PKGLATESTREPOSITORY} ]; then \ @@ -266,7 +269,7 @@ do-package: ${TMPPLIST} exit 1; \ fi; \ fi ; \ - ${LN} -s ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PKGLATESTFILE} ; \ + ${LN} -sf ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PKGLATESTFILE} ; \ fi; \ else \ cd ${.CURDIR} && eval ${MAKE} delete-package; \