From ea4e34e3e1059fe92876b336cd3e481800e8f34f Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Mon, 7 Feb 2022 13:34:03 +0000 Subject: [PATCH] Rebuild later packages if dev package changes (#739) If a development package has committed or uncommitted changes, any packages depending on it should be rebuilt with the new code. This patch implements this. This is done by incorporating the `devel_hash` of every dependency (if present) in a package's overall hash, so that if a dependency changes, we rebuild packages that depend on it. A dev package's hash itself doesn't change, however, so we keep rebuilding it in the same build area. --- alibuild_helpers/build.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/alibuild_helpers/build.py b/alibuild_helpers/build.py index ba97059c..76f30cf9 100644 --- a/alibuild_helpers/build.py +++ b/alibuild_helpers/build.py @@ -176,8 +176,9 @@ def h_all(data): # pylint: disable=function-redefined dh = Hasher() for dep in spec.get("requires", []): # At this point, our dependencies have a single hash, local or remote. - h_all(specs[dep]["hash"]) - dh(specs[dep]["hash"] + specs[dep].get("devel_hash", "")) + hash_and_devel_hash = specs[dep]["hash"] + specs[dep].get("devel_hash", "") + h_all(hash_and_devel_hash) + dh(hash_and_devel_hash) if isDevelPkg and "incremental_recipe" in spec: h_all(spec["incremental_recipe"])