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

nix upgrade is broken #782

Closed
2 of 4 tasks
Pr0Ger opened this issue Apr 25, 2024 · 1 comment · Fixed by #874
Closed
2 of 4 tasks

nix upgrade is broken #782

Pr0Ger opened this issue Apr 25, 2024 · 1 comment · Fixed by #874
Labels
C-bug Something isn't working

Comments

@Pr0Ger
Copy link

Pr0Ger commented Apr 25, 2024

Erroneous Behavior

Upgrade nix step is broken on nix 2.21.0 and higher

warning: Package name '.*' does not match any packages in the profile.
warning: No packages to upgrade. Use 'nix profile list' to see the current profile.

Expected Behavior

nix packages is upgraded

Steps to reproduce

  1. upgrade nix to version higher than 2.21
  2. run topgrade

Possible Cause (Optional)

NixOS/nix#10166

topgrade is using nix profile upgrade '.*' which is no longer work as expected
if nix version is higher than 2.21 topgrade should use either nix profile upgrade --regex '.*' or nix profile upgrade --all

Problem persists without calling from topgrade

  • Yes
  • No

Did you run topgrade through Remote Execution

  • Yes
  • No

Additional Details

  • Operation System/Version
❯ uname -a
Darwin 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:37 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6031 arm64

~ 
❯ nix --version
nix (Nix) 2.21.2
  • Topgrade version (topgrade -V) 14.0.1

Verbose Output (topgrade -v)

...
── 04:03:30 - Nix ──────────────────────────────────────────────────────────────
DEBUG Executing command `/nix/var/nix/profiles/default/bin/nix-channel --update`
unpacking 0 channels...
DEBUG Executing command `/nix/var/nix/profiles/default/bin/nix --extra-experimental-features nix-command profile upgrade '.*' --verbose`
warning: Package name '.*' does not match any packages in the profile.
warning: No packages to upgrade. Use 'nix profile list' to see the current profile.
...
@Pr0Ger Pr0Ger added the C-bug Something isn't working label Apr 25, 2024
@SteveLauC
Copy link
Member

PR welcome if you want to give it a fix, personally I am not a Nix user

dashmoho pushed a commit to dashmoho/topgrade that referenced this issue Jul 23, 2024
Nix version 2.21 changed how packages are ugpraded.
Fixes topgrade-rs#782.
dashmoho pushed a commit to dashmoho/topgrade that referenced this issue Jul 23, 2024
Nix version 2.21 changed how packages are ugpraded.
Fixes topgrade-rs#782.
dashmoho pushed a commit to dashmoho/topgrade that referenced this issue Jul 23, 2024
Nix version 2.21 changed how packages are upgraded.
Fixes topgrade-rs#782.
@dashmoho dashmoho mentioned this issue Jul 23, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants