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

Should nixos-rebuild switch --upgrade update all channels? #44360

Open
davidak opened this issue Aug 2, 2018 · 5 comments
Open

Should nixos-rebuild switch --upgrade update all channels? #44360

davidak opened this issue Aug 2, 2018 · 5 comments

Comments

@davidak
Copy link
Member

davidak commented Aug 2, 2018

Issue description

I expected it would update all channels and struggled with problems due to other channels are not updated.

The docs are clear that it only updates the nixos channel. https://nixos.org/nixos/manual/#sec-upgrading

https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/installer/tools/nixos-rebuild.sh#L197

I had to use nix-channel --update in addition to rebuild the system.

So i suggest to change this to actually update all channels.

In 2015, this change was already proposed by @aszlig, but @edolstra had concerns that users might not want to update all channels. What do you think now? #7349 (comment)

Maybe in that case such users can use nix-channel --update nixos; nixos-rebuild switch and a user that just want to update everything runs nixos-rebuild switch --upgrade?

Steps to reproduce

  1. have packages from unstable davidak/nixos-config@a1241ef
  2. nixos-rebuild switch --upgrade
  3. wonder why packages from unstable are not updated

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.14.59, NixOS, 18.03.133017.0e55dde2eaa (Impala)
  • multi-user?: no
  • sandbox: yes
  • version: nix-env (Nix) 2.0.4
  • channels(root): "nixos-18.03.133023.18401b99f3f, nixos-hardware, nixos-unstable-18.09pre147850.2428f5dda13"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs
@nixy
Copy link
Contributor

nixy commented Aug 2, 2018

It seems like the upgrade code has functionality for auto-upgrading other channels, but only if a .update-on-nixos-rebuild file exists in the channel.

It might be better to add a nixos option or nix-channel flag (--add --update-on-rebuild) to make it easier to add and manage that file for channels instead of changing the default behavior.

@davidak
Copy link
Member Author

davidak commented Nov 19, 2018

The behaviour i expect is even documented in the unofficial nixos.wiki:

screenshot from 2018-11-19 15-46-11

Since it would be a breaking change, just change it for the next release?

@stale
Copy link

stale bot commented Jun 3, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2020
@Lqp1
Copy link

Lqp1 commented Jul 25, 2020

Hello,

I was a bit surprised with this too.
I use mainly stable channel, but use also 1 package from unstable channel (for syncthing) on my home box. I enabled auto updates and noticed this particulier package was never upgraded, and finally had a version bellow the stable one (because I explicitely asked for unstable).

Maybe this should be futher documented or we should have an option in auto update feature to refresh all channels?

Or did anyone find a workaround for this?

Thanks

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 25, 2020
@stale
Copy link

stale bot commented Jan 21, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 21, 2021
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants