Skip to content

Commit

Permalink
Rebuild later packages if dev package changes (#739)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
TimoWilken authored Feb 7, 2022
1 parent c94f014 commit ea4e34e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions alibuild_helpers/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down

0 comments on commit ea4e34e

Please sign in to comment.