Skip to content
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

nixos/systemd: Explicitly put default path packages after othe… #77088

Merged
merged 1 commit into from Jan 6, 2020

Conversation

@Infinisil
Copy link
Member

@Infinisil Infinisil commented Jan 6, 2020

Motivation for this change

This fixes the dhcpcd issue in #76969, which was exposed by #75031 introducing changes in the module ordering and therefore option ordering too.

The dhcpcd issue would also be fixable by explicitly putting
dhcpcd's paths before others, however it makes more sense for systemd's
default paths to be after all others by default, since they should only
be a fallback, which is how binary finding will work if they come after.

Ping @demokritos @izuk @karolchmist

Things done
  • Tested that this actually fixes the issue (checking cat /etc/resolv.conf)
This fixes the dhcpcd issue in #76969,
which was exposed by #75031
introducing changes in the module ordering and therefore option ordering
too.

The dhcpcd issue would also be fixable by explicitly putting
dhcpcd's paths before others, however it makes more sense for systemd's
default paths to be after all others by default, since they should only
be a fallback, which is how binary finding will work if they come after.
@worldofpeace
Copy link
Member

@worldofpeace worldofpeace commented Jan 6, 2020

All the time has this caused an issue for me 👍
🎊 To a fix.

@Infinisil
Copy link
Member Author

@Infinisil Infinisil commented Jan 6, 2020

Not sure why ofborg doesn't start eval, trying manually..

@GrahamcOfBorg eval

Edit: Nope!

@worldofpeace
Copy link
Member

@worldofpeace worldofpeace commented Jan 6, 2020

@Infinisil ofborg hasn't made its 2020 comeback yet?
🏗️ guess it's time to get that going.

@Infinisil
Copy link
Member Author

@Infinisil Infinisil commented Jan 6, 2020

I asked graham what's up with that in #nixos-borg, haven't heard back yet

@rnhmjoj
Copy link
Contributor

@rnhmjoj rnhmjoj commented Jan 6, 2020

Intersting: this already happened once: #55886 (comment). I fixed it by lowering the priority of systemd (d16a243). I'm not sure why it happened last year. Also, do you know why/how did your PR affect priorities?

@Infinisil
Copy link
Member Author

@Infinisil Infinisil commented Jan 6, 2020

@rnhmjoj Ah that's something slightly different: In that case systemd and openresolv are installed into a single environment with buildEnv. This creates a single package out of multiple ones, such that you can have PATH=/run/current-system/sw/bin and have many packages available. This lead to a collision because multiple ones are providing the same binary. This can be fixed with priorities.

In this case however we have PATH=/nix/store/...-systemd/bin:/nix/store/...-openresolv/bin, so the packages are different in PATH, they're not joined into a single one. Instead now the ordering of them in PATH matters for which one gets chosen.

@rnhmjoj
Copy link
Contributor

@rnhmjoj rnhmjoj commented Jan 6, 2020

@Infinisil Ah, I see. Thank you for the explanation.

@karolchmist
Copy link
Contributor

@karolchmist karolchmist commented Jan 6, 2020

It fixes #76969 for me 👍

@Infinisil
Copy link
Member Author

@Infinisil Infinisil commented Jan 6, 2020

Alright let's just merge even without the bot, what could go wrong with such a simple change! (famous last words..)

@Infinisil Infinisil changed the title nixos/systemd: Explicitly put default path packages after others nixos/systemd: Explicitly put default path packages after othe… Jan 6, 2020
@Infinisil Infinisil merged commit ff16d17 into NixOS:master Jan 6, 2020
@Infinisil Infinisil deleted the Infinisil:fix-systemd-path branch Jan 6, 2020
@Infinisil Infinisil mentioned this pull request Aug 2, 2020
3 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.