summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorgdt <gdt@pkgsrc.org>2010-09-14 22:30:42 +0000
committergdt <gdt@pkgsrc.org>2010-09-14 22:30:42 +0000
commit5fb904ab4a02cb54badb5c9f142b542e32f12557 (patch)
tree140a3d38bc6f3225a7f1a709ba0767fde315da35 /mk
parentdb30eb1d436841fffc68ce2792e4a97c10a014d1 (diff)
downloadpkgsrc-5fb904ab4a02cb54badb5c9f142b542e32f12557.tar.gz
Use new "pkg-add -U -D" for make replace in DESTDIR case.
Removes overbroad use of -f to override the depending-packages-have-satisfied-dependencies check, replacing with the narrow override of -D. Discussed on tech-pkg@. OK pkgsrc-pmc@.
Diffstat (limited to 'mk')
-rw-r--r--mk/flavor/pkg/replace.mk20
1 files changed, 10 insertions, 10 deletions
diff --git a/mk/flavor/pkg/replace.mk b/mk/flavor/pkg/replace.mk
index a077a38867c..24180c75697 100644
--- a/mk/flavor/pkg/replace.mk
+++ b/mk/flavor/pkg/replace.mk
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.30 2010/06/16 15:15:05 gdt Exp $
+# $NetBSD: replace.mk,v 1.31 2010/09/14 22:30:42 gdt Exp $
#
# _flavor-replace:
@@ -183,23 +183,23 @@ replace-clean: .PHONY
# Logically we would like to do a "pkg_add -U". However, that fails
# if there is a depending package that exactly depends on the package
-# being replaced. Historically, 'make replace' would replace a
-# package regardless of whether that broke depending packages
-# (typically due to shlib ABI changes, especially major version
-# bumps). Therefore, make replace in DESTDIR mode should behave the
-# same way. unsafe_depends will be set on depending packages, and
-# then those may be rebuilt via a manual process or by
-# pkg_rolling-replace.
+# being replaced, so we override that check with -D. Historically,
+# 'make replace' would replace a package regardless of whether that
+# broke depending packages (typically due to shlib ABI changes,
+# especially major version bumps). Therefore, make replace in DESTDIR
+# mode should behave the same way. unsafe_depends will be set on
+# depending packages, and then those may be rebuilt via a manual
+# process or by pkg_rolling-replace.
replace-destdir: .PHONY
@${PHASE_MSG} "Updating using binary package of "${PKGNAME:Q}
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
@${MKDIR} ${_CROSS_DESTDIR}${PREFIX}
- ${PKG_ADD} -U -m ${MACHINE_ARCH} -I -p ${_CROSS_DESTDIR}${PREFIX} ${PKGFILE} || ${PKG_ADD} -U -f -m ${MACHINE_ARCH} -I -p ${_CROSS_DESTDIR}${PREFIX} ${PKGFILE}
+ ${PKG_ADD} -U -D -m ${MACHINE_ARCH} -I -p ${_CROSS_DESTDIR}${PREFIX} ${PKGFILE}
@${ECHO} "Fixing recorded cwd..."
@${SED} -e 's|@cwd ${_CROSS_DESTDIR}|@cwd |' ${_PKG_DBDIR}/${PKGNAME:Q}/+CONTENTS > ${_PKG_DBDIR}/${PKGNAME:Q}/+CONTENTS.tmp
@${MV} ${_PKG_DBDIR}/${PKGNAME:Q}/+CONTENTS.tmp ${_PKG_DBDIR}/${PKGNAME:Q}/+CONTENTS
.else
- ${PKG_ADD} -U ${PKGFILE} || ${PKG_ADD} -U -f ${PKGFILE}
+ ${PKG_ADD} -U -D ${PKGFILE}
.endif
${RUN}${_REPLACE_OLDNAME_CMD}; \
${PKG_INFO} -qR ${PKGNAME:Q} | while read pkg; do \