-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check-meta(hasUnsupportedPlatform): use lib.meta.availableOn #195294
Conversation
lib/meta.nix
Outdated
if !(pkg?meta) then true else | ||
(!(pkg.meta ? platforms) || | ||
lib.any (platformMatch platform) pkg.meta.platforms) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can check the full attribute path using ?
.
if !(pkg?meta) then true else | |
(!(pkg.meta ? platforms) || | |
lib.any (platformMatch platform) pkg.meta.platforms) && | |
if !(pkg ? meta.platforms) then true else | |
lib.any (platformMatch platform) pkg.meta.platforms && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this altered the logic -- after the commit above meta.badPlatforms
is ignored if meta.platforms
is absent. I have adjusted for this in 194a4ea1a236.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a squash.
`hasUnsupportedPlatform` was not updated with #37395, so it does not understand attrsets in `meta.[bad]platforms`. In particular, attrsets in `meta.badPlatforms` will "fail open" and be ignored. Let's use `lib.meta.availableOn` instead of duplicating its logic. Thanks to @alyssais for [noticing][1]. [1][#194148 (comment)] Co-authored-by: sternenseemann <sternenseemann@systemli.org>
Description of changes
hasUnsupportedPlatform
was not updated with #37395, so it does not understand attrsets inmeta.[bad]platforms
. In particular, attrsets inmeta.badPlatforms
will "fail open" and be ignored.Let's use
lib.meta.availableOn
instead of duplicating its logic.Thanks to @alyssais for noticing.
CC: @Ericson2314
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes