meta: Don't bypass unsupported platforms with allowBroken.

Our platforms are open-world oriented these days, and anyway there's allowUnsupportedSystem.
This commit is contained in:
Shea Levy 2018-04-09 06:23:31 -04:00 committed by John Ericson
parent 3458776bb1
commit 3955b84698

View File

@ -75,6 +75,7 @@ let
remediation = { remediation = {
unfree = remediate_whitelist "Unfree"; unfree = remediate_whitelist "Unfree";
broken = remediate_whitelist "Broken"; broken = remediate_whitelist "Broken";
unsupported = remediate_whitelist "UnsupportedSystem";
blacklisted = x: ""; blacklisted = x: "";
insecure = remediate_insecure; insecure = remediate_insecure;
unknown-meta = x: ""; unknown-meta = x: "";
@ -192,8 +193,8 @@ let
{ valid = false; reason = "blacklisted"; errormsg = "has a blacklisted license (${showLicense attrs.meta.license})"; } { valid = false; reason = "blacklisted"; errormsg = "has a blacklisted license (${showLicense attrs.meta.license})"; }
else if !allowBroken && attrs.meta.broken or false then else if !allowBroken && attrs.meta.broken or false then
{ valid = false; reason = "broken"; errormsg = "is marked as broken"; } { valid = false; reason = "broken"; errormsg = "is marked as broken"; }
else if !allowUnsupportedSystem && !allowBroken && !(checkPlatform attrs) then else if !allowUnsupportedSystem && !(checkPlatform attrs) then
{ valid = false; reason = "broken"; errormsg = "is not supported on ${hostPlatform.config}"; } { valid = false; reason = "unsupported"; errormsg = "is not supported on ${hostPlatform.config}"; }
else if !(hasAllowedInsecure attrs) then else if !(hasAllowedInsecure attrs) then
{ valid = false; reason = "insecure"; errormsg = "is marked as insecure"; } { valid = false; reason = "insecure"; errormsg = "is marked as insecure"; }
else let res = checkMeta (attrs.meta or {}); in if res != [] then else let res = checkMeta (attrs.meta or {}); in if res != [] then