release-lib.nix: make packagePlatforms respect badPlatforms
packagePlatforms previously ignored badPlatforms, probably because it is
a fairly [recent] addition. While check-meta.nix doesn't implement it
using subtractLists, it is basically equivalent to the following logic:
platformSet - badPlatformSet (= effectivePlatformSet)
which we implement using subtractLists (which has somewhat confusing
currying-optimized argument order).
This flaw was discovered when testing #177901 which heavily uses
badPlatforms.
[recent]: b0482248fe
This commit is contained in:
parent
9a3e8f3cd4
commit
f4286483ee
|
@ -146,7 +146,8 @@ rec {
|
||||||
packagePlatforms = mapAttrs (name: value:
|
packagePlatforms = mapAttrs (name: value:
|
||||||
if isDerivation value then
|
if isDerivation value then
|
||||||
value.meta.hydraPlatforms
|
value.meta.hydraPlatforms
|
||||||
or (value.meta.platforms or [ "x86_64-linux" ])
|
or (lib.subtractLists (value.meta.badPlatforms or [])
|
||||||
|
(value.meta.platforms or [ "x86_64-linux" ]))
|
||||||
else if value.recurseForDerivations or false || value.recurseForRelease or false then
|
else if value.recurseForDerivations or false || value.recurseForRelease or false then
|
||||||
packagePlatforms value
|
packagePlatforms value
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue