-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
linux-testing: default to latest if it is newer #130872
Conversation
pkgs/top-level/all-packages.nix
Outdated
linuxPackages_testing = | ||
if lib.versionAtLeast linux_latest.version pkgs.linux_testing.version | ||
then linuxPackages_latest | ||
else linuxPackagesFor pkgs.linux_testing; |
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.
linuxPackages_testing = | |
if lib.versionAtLeast linux_latest.version pkgs.linux_testing.version | |
then linuxPackages_latest | |
else linuxPackagesFor pkgs.linux_testing; | |
linuxPackages_testing = | |
if linux_latest.kernelOlder linux_testing.version | |
then linuxPackages_latest | |
else linuxPackagesFor linux_testing; |
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.
@Atemu Nice suggestion, didn't know about that function! But I think it should be linux_latest.kernelAtLeast
or the arguments need to be flipped.
nix-repl> if linux_latest.kernelAtLeast linux_testing.version then linux_latest.version else linux_testing.version
"5.13.3"
nix-repl> if linux_latest.kernelOlder linux_testing.version then linux_latest.version else linux_testing.version
"5.13-rc6"
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.
Ah yes, didn't actually test.
@Atemu is this the solution you wanted? |
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.
Yeah, please squash those commits though.
8a7fad0
to
1ed3a6e
Compare
Sorry, now it's squashed! |
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.
Um, what about linux_testing though?
It'd probably be better to implement the switch there instead.
I thought about it, but I'd like it to still be accessible, but not the default. If that is a wrong assumption, I'll switch it around. EDIT: I could revert and add a new |
Result of 10 packages failed to build:
1 package skipped due to time constraints:
43 packages built successfully:
Note that build failures may predate this PR, and could be nondeterministic or hardware dependent. |
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.
No, just put it that on _latest aswell. I can't imagine a true use-case where you'd want an RC instead of the released version.
@Atemu Maybe I'm too tired, but I don't understand, what I should do. Could you rephrase it? |
Put the logic in linux_testing instead of linuxPackages. |
c1a0ceb
to
77044b0
Compare
@Atemu wdyt now? |
pkgs/top-level/all-packages.nix
Outdated
let linux_testing = | ||
callPackage ../os-specific/linux/kernel/linux-testing.nix { | ||
kernelPatches = [ | ||
kernelPatches.bridge_stp_helper | ||
kernelPatches.request_key_helper | ||
]; | ||
}; | ||
in if linux_latest.kernelAtLeast linux_testing.version | ||
then linux_latest | ||
else linux_testing; |
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.
Creating a new linux_testing
in the let statement makes things ambigous. TBH, just do away with the let and inline it.
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 renamed it linux_testing_
for the let binding, so it's easier to read and not ambiguous.
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.
To be frank, that's even worse.
Just inline it please.
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.
Looking into it again, I just realised that what I said is stupid: You need to reference _testing in the version check and therefore can't inline it.
9dc5c79
to
f0595b3
Compare
I think #98865 is a better approach. It turns out we don't update linux_testing regularly anyway, so ppl are probably better off choosing the version themselves. |
updated for new kernel infra
f0595b3
to
fd588c8
Compare
closing in favor of #144979 |
Motivation for this change
Testing users probably prefer newer to unstable versions.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)