pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/flavor/pkg Use new "pkg-add -U -D" for make replace...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/751cf2ed9b8b
branches:  trunk
changeset: 580650:751cf2ed9b8b
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Tue Sep 14 22:30:42 2010 +0000

description:
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:

 mk/flavor/pkg/replace.mk |  20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diffs (42 lines):

diff -r 5123ffa218a6 -r 751cf2ed9b8b mk/flavor/pkg/replace.mk
--- a/mk/flavor/pkg/replace.mk  Tue Sep 14 22:29:07 2010 +0000
+++ b/mk/flavor/pkg/replace.mk  Tue Sep 14 22:30:42 2010 +0000
@@ -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 @@
 
 # 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 \



Home | Main Index | Thread Index | Old Index