Skip to content

Commit

Permalink
Add assertions about spec / recipe validity.
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf committed Oct 15, 2024
1 parent b33c1fe commit 715a3da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions alibuild_helpers/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,10 @@ def getPackageList(packages, specs, configDir, preferSystem, noSystem,
filename = taps.get(pkg_filename, "%s/%s.sh" % (configDir, pkg_filename))
err, spec, recipe = parseRecipe(getRecipeReader(filename, configDir))
dieOnError(err, err)
# Unless there was an error, both spec and recipe should be valid.
# otherwise the error should have been caught above.
assert(spec is not None)
assert(recipe is not None)
dieOnError(spec["package"].lower() != pkg_filename,
"%s.sh has different package field: %s" % (p, spec["package"]))

Expand Down

0 comments on commit 715a3da

Please sign in to comment.