now that pkg_add does the right thing when confronted with stuff that's
already installed, use it directly for updates.
This commit is contained in:
parent
ebbe7e6d91
commit
e67b8501b3
@ -1,6 +1,6 @@
|
||||
#-*- mode: Makefile; tab-width: 4; -*-
|
||||
# ex:ts=4 sw=4 filetype=make:
|
||||
# $OpenBSD: bsd.port.mk,v 1.737 2005/11/11 11:31:53 espie Exp $
|
||||
# $OpenBSD: bsd.port.mk,v 1.738 2005/11/15 18:14:56 espie Exp $
|
||||
# $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
|
||||
# $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
|
||||
#
|
||||
@ -2008,22 +2008,12 @@ ${_UPDATE_COOKIE}: ${_PACKAGE_COOKIES}
|
||||
@mkdir -p ${UPDATE_COOKIES_DIR}
|
||||
.endif
|
||||
@${ECHO_MSG} "===> Updating for ${FULLPKGNAME${SUBPACKAGE}}"
|
||||
.if ${FORCE_UPDATE:L} == "yes"
|
||||
@a=`pkg_info -e ${FULLPKGPATH} 2>/dev/null || true`; \
|
||||
case $$a in \
|
||||
'') ${ECHO_MSG} "Not installed, no update";; \
|
||||
*) ${ECHO_MSG} "Upgrading from $$a"; \
|
||||
${SUDO} ${SETENV} PKG_PATH=${PKGREPOSITORY}/ PKG_TMPDIR=${PKG_TMPDIR} pkg_add ${_PKG_ADD_AUTO} ${_PKG_ADD_FORCE} ${PKGFILE${SUBPACKAGE}};; \
|
||||
${SUDO} ${SETENV} PKG_PATH=${PKGREPOSITORY}/ PKG_TMPDIR=${PKG_TMPDIR} pkg_add ${_PKG_ADD_AUTO} -r ${_PKG_ADD_FORCE} ${PKGFILE${SUBPACKAGE}};; \
|
||||
esac
|
||||
.else
|
||||
@a=`pkg_info -e ${FULLPKGPATH} 2>/dev/null || true`; \
|
||||
case $$a in \
|
||||
'') ${ECHO_MSG} "Not installed, no update";; \
|
||||
'${FULLPKGNAME${SUBPACKAGE}}') ${ECHO_MSG} "Already installed, no update";; \
|
||||
*) ${ECHO_MSG} "Upgrading from $$a"; \
|
||||
${SUDO} ${SETENV} PKG_PATH=${PKGREPOSITORY}/ PKG_TMPDIR=${PKG_TMPDIR} pkg_add ${_PKG_ADD_AUTO} -r ${PKGFILE${SUBPACKAGE}};; \
|
||||
esac
|
||||
.endif
|
||||
@${_MAKE_COOKIE} $@
|
||||
|
||||
# The real package
|
||||
|
Loading…
Reference in New Issue
Block a user