From 3d0b2a6186828bf68883c70dcf8b0db438f185af Mon Sep 17 00:00:00 2001 From: gdt Date: Wed, 8 Aug 2007 02:07:27 +0000 Subject: Change the meaning of unsafe_depends to mean that a dependency has been replaced which might have had an ABI change. In practice, a package is considered to maybe have had an ABI change if the version changes. Introduce a new tag unsafe_depends_strict, which is unconditionally set on depending packages whenever make replace is done. This will cut down considerably on the amount of rebuilding required with pkg_rolling-replace, while still guaranteing that packages are rebuilt if there was an ABI change in a dependency. --- mk/flavor/pkg/replace.mk | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'mk') diff --git a/mk/flavor/pkg/replace.mk b/mk/flavor/pkg/replace.mk index 649e69babc3..b792c3e5129 100644 --- a/mk/flavor/pkg/replace.mk +++ b/mk/flavor/pkg/replace.mk @@ -1,4 +1,4 @@ -# $NetBSD: replace.mk,v 1.11 2007/08/08 01:44:24 gdt Exp $ +# $NetBSD: replace.mk,v 1.12 2007/08/08 02:07:27 gdt Exp $ # # _flavor-replace: @@ -138,7 +138,10 @@ replace-preserve-required-by: .PHONY ### replace-fixup-required-by (PRIVATE) ###################################################################### ### replace-fixup-required-by fixes the +CONTENTS files of dependent -### packages to refer to the replacement package. +### packages to refer to the replacement package. It also sets the +### unsafe_depends_strict tag on each dependent package, and sets the +### unsafe_depends tag if the replaced package has a different version. +### XXX Only set unsafe_depends if there is an ABI change. replace-fixup-required-by: .PHONY @${STEP_MSG} "Fixing @pkgdep entries in dependent packages." ${_PKG_SILENT}${_PKG_DEBUG} \ @@ -162,7 +165,10 @@ replace-fixup-required-by: .PHONY { print }' \ $$contents > $$newcontents; \ ${MV} -f $$newcontents $$contents; \ - ${PKG_ADMIN} set unsafe_depends=YES $$pkg; \ + ${PKG_ADMIN} set unsafe_depends_strict=YES $$pkg; \ + if ${TEST} "$$oldname" != "$$newname"; then \ + ${PKG_ADMIN} set unsafe_depends=YES $$pkg; \ + fi; \ done ###################################################################### -- cgit v1.2.3