Skip to content

Commit

Permalink
Make system_requirement more useful
Browse files Browse the repository at this point in the history
This allows people to define system requirements also for
packages which have a recipe. It also falls back to prefer_system_check
when system_requirement_check is missing. This will allow us,
for example to say:

system_requirement: (ubuntu|osx)

for packages which want to pick up from the system on those two
architectures, e.g. openssl.
  • Loading branch information
ktf committed May 13, 2022
1 parent 571103b commit a5d4c1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions alibuild_helpers/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,10 @@ def getPackageList(packages, specs, configDir, preferSystem, noSystem,
else:
ownPackages.update([spec["package"]])

dieOnError(("system_requirement" in spec) and recipe.strip("\n\t "),
"System requirements %s cannot have a recipe" % spec["package"])
if re.match(spec.get("system_requirement", "(?!.*)"), architecture):
cmd = spec.get("system_requirement_check", "false")
# system_requirement fallsback to the prefer_system_check rule
# if the system_requirement_check does not exist.
cmd = spec.get("system_requirement_check", spec.get("prefer_system_check", "false"))
if not spec["package"] in requirementsCache:
requirementsCache[spec["package"]] = performRequirementCheck(spec, cmd.strip())

Expand Down

0 comments on commit a5d4c1f

Please sign in to comment.