summaryrefslogtreecommitdiff
path: root/mk/flavor
diff options
context:
space:
mode:
authorgdt <gdt>2007-08-08 02:07:27 +0000
committergdt <gdt>2007-08-08 02:07:27 +0000
commit3d0b2a6186828bf68883c70dcf8b0db438f185af (patch)
treea66e6ec88043cf7a53874b686bff58a65305267a /mk/flavor
parenta4964d6ac364be61839680e9bc9e2e6343a34cf7 (diff)
downloadpkgsrc-3d0b2a6186828bf68883c70dcf8b0db438f185af.tar.gz
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.
Diffstat (limited to 'mk/flavor')
-rw-r--r--mk/flavor/pkg/replace.mk12
1 files changed, 9 insertions, 3 deletions
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
######################################################################