lix-installer repair action seems to work when Nix is not installed #32
Labels
No labels
Compat/Breaking
Context/drive-by
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status/Fixed On Main
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix-installer#32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Haven't tried with determinate system installer but they could have the same issue.
Trace output (I ran it two times first time was without any trace output, so there might have changes done to the filesystem which do not show up here) :
info: downloading installer (https://install.lix.systems/lix/lix-installer-x86_64-linux) 2024-10-27T13:19:11.845122Z TRACE execute:execute: lix_installer::cli: Running as EUID 1000 `lix-installer` needs to run as `root`, attempting to escalate now via `sudo`... 2024-10-27T13:19:11.845351Z TRACE execute:execute: lix_installer::cli: Execvp'ing `"sudo"` with args `["sudo", "env", "NIX_INSTALLER_LOG_DIRECTIVES=1", "SHELL=/bin/bash", "/tmp/tmp.DvQR3rA5AR/lix-installer", "--logger", "full", "-vv", "repair"]` 2024-10-27T13:19:12.979964Z TRACE execute:execute: lix_installer::cli: Running as EUID 0 2024-10-27T13:19:12.980039Z INFO execute:execute: lix_installer::cli::subcommand::repair: Will ensure the Nix shell profiles are still being sourced 2024-10-27T13:19:12.980522Z DEBUG execute:execute:plan:plan: lix_installer::action::base::create_or_insert_into_file: Inserting into `/etc/bashrc` already complete 2024-10-27T13:19:12.980931Z DEBUG execute:execute:plan:plan: lix_installer::action::base::create_or_insert_into_file: Inserting into `/etc/profile.d/nix.sh` already complete 2024-10-27T13:19:12.981341Z DEBUG execute:execute:plan:plan: lix_installer::action::base::create_or_insert_into_file: Inserting into `/etc/bash.bashrc` already complete 2024-10-27T13:19:12.981550Z DEBUG execute:execute:plan:plan: lix_installer::action::base::create_or_insert_into_file: Inserting into `/etc/zshrc` already complete 2024-10-27T13:19:12.981737Z DEBUG execute:execute:plan:plan: lix_installer::action::base::create_or_insert_into_file: Inserting into `/etc/zsh/zshrc` already complete 2024-10-27T13:19:12.981807Z TRACE execute:execute:plan:plan:execute_command{command="mount" "-f"}: lix_installer: Executing 2024-10-27T13:19:12.984832Z DEBUG execute:execute:plan:plan: lix_installer::action::base::create_directory: Creating directory `/usr/share/fish/vendor_conf.d` already complete is_mountpoint=false 2024-10-27T13:19:12.985205Z DEBUG execute:execute:plan:plan: lix_installer::action::base::create_or_insert_into_file: Inserting into `/usr/share/fish/vendor_conf.d/nix.fish` already complete 2024-10-27T13:19:12.985254Z DEBUG execute:execute:try_execute: lix_installer::action::stateful: Executing: Configure the shell profiles 2024-10-27T13:19:12.985282Z TRACE execute:execute:try_execute:execute:create_directory{path=/usr/share/fish/vendor_conf.d mode=0o755}: lix_installer::action::stateful: Completed: (Already done) Create directory `/usr/share/fish/vendor_conf.d` 2024-10-27T13:19:12.985450Z TRACE execute:execute:try_execute:execute:create_or_insert_file{path=/etc/bashrc mode=0o644 buf="\n# Nix\nif [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then\n . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'\nfi\n# End Nix\n\n \n"}: lix_installer::action::stateful: Completed: (Already done) Create or insert file `/etc/bashrc` 2024-10-27T13:19:12.985506Z TRACE execute:execute:try_execute:execute:create_or_insert_file{path=/etc/bash.bashrc mode=0o644 buf="\n# Nix\nif [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then\n . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'\nfi\n# End Nix\n\n \n"}: lix_installer::action::stateful: Completed: (Already done) Create or insert file `/etc/bash.bashrc` 2024-10-27T13:19:12.985571Z TRACE execute:execute:try_execute:execute:create_or_insert_file{path=/etc/zsh/zshrc mode=0o644 buf="\n# Nix\nif [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then\n . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'\nfi\n# End Nix\n\n \n"}: lix_installer::action::stateful: Completed: (Already done) Create or insert file `/etc/zsh/zshrc` 2024-10-27T13:19:12.985646Z TRACE execute:execute:try_execute:execute:create_or_insert_file{path=/etc/profile.d/nix.sh mode=0o644 buf="\n# Nix\nif [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then\n . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'\nfi\n# End Nix\n\n \n"}: lix_installer::action::stateful: Completed: (Already done) Create or insert file `/etc/profile.d/nix.sh` 2024-10-27T13:19:12.985691Z TRACE execute:execute:try_execute:execute:create_or_insert_file{path=/etc/zshrc mode=0o644 buf="\n# Nix\nif [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then\n . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'\nfi\n# End Nix\n\n \n"}: lix_installer::action::stateful: Completed: (Already done) Create or insert file `/etc/zshrc` 2024-10-27T13:19:12.985727Z TRACE execute:execute:try_execute:execute:create_or_insert_file{path=/usr/share/fish/vendor_conf.d/nix.fish mode=0o644 buf="\n# Nix\nif test -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish'\n . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish'\nend\n# End Nix\n\n"}: lix_installer::action::stateful: Completed: (Already done) Create or insert file `/usr/share/fish/vendor_conf.d/nix.fish` 2024-10-27T13:19:12.985914Z DEBUG execute:execute:try_execute: lix_installer::action::stateful: Completed: Configure the shell profiles 2024-10-27T13:19:12.986020Z INFO execute:execute: lix_installer::cli::subcommand::repair: Finished repairing successfully!EDIT: I've also tried all the others steps (beside install, some throw a backtrace/rust panic), I may try and expand the test framework after having discussed this in Matrix, I believe the installer would be able to handle gracefully cases where Nix is not installed, I think by checking if the path
/nix/storeexists and if thenixcommand exists or not we can fail pretty early.Sorry, I don't understand what the issue you're facing is :/
Is there something you expect
repairto do which it does not?