Skip to content

Aura refuses to run if sudo is supplied #907

@ellsclytn

Description

@ellsclytn

Erroneous Behavior

When attempting to run topgrade with arch_package_manager = "aura", I would receive an error from aura: aura :: Running Aura with sudo is not necessary.

Expected Behavior

Topgrade invokes aura without sudo, allowing aura to properly run.

Steps to reproduce

Arch Linux system with v4.0.6 of Aura or later.

Tropgrade config with:

[linux]
arch_package_manager = "aura"

Then run topgrade

Possible Cause (Optional)

v4.0.6 of Aura now exits early if aura is run with sudo (since v4.0.0 Aura has no longer required sudo).

Problem persists without calling from topgrade

  • Yes (only if I run with sudo. Works fine without)
  • No

Did you run topgrade through Remote Execution

  • Yes
  • No

If yes, does the issue still occur when you run topgrade directlly in your
remote host

  • Yes
  • No

Additional Details

  • Operation System/Version

    Arch Linux 6.10.9-arch1-2 x86_64

  • Installation

    Using Aura with the AUR bin version

  • Topgrade version (topgrade -V): Topgrade 15.0.0

Verbose Output (topgrade -v)

DEBUG Configuration at /home/user/.config/topgrade.toml
DEBUG Loaded configuration: ConfigFile { include: Some(Include { paths: None }), misc: Some(Misc { pre_sudo: None, sudo_command: None, disable: Some([Containers, Lensfun, Node, Pnpm, Yarn, Nix]), ignore_failures: None, remote_topgrades: None, remote_topgrade_path: None, ssh_arguments: None, tmux_arguments: None, set_title: None, display_time: None, assume_yes: None, no_retry: None, run_in_tmux: None, cleanup: None, notify_each_step: None, skip_notify: Some(true), bashit_branch: None, only: None, no_self_update: Some(true), log_filters: None }), pre_commands: Some({}), post_commands: None, commands: Some({"dotter": "bash -c 'cd ~/.dotfiles && dotter'", "sync-packages": "~/.dotfiles/bin/sync-packages", "treesitter": "nvim --headless +TSUpdateSync +qa"}), python: Some(Python { enable_pip_review: None, enable_pip_review_local: None, enable_pipupgrade: None, pipupgrade_arguments: None }), composer: Some(Composer { self_update: None }), brew: Some(Brew { greedy_cask: None, greedy_latest: None, autoremove: None, fetch_head: None }), linux: Some(Linux { yay_arguments: None, aura_aur_arguments: None, aura_pacman_arguments: None, arch_package_manager: Some(Aura), show_arch_news: None, garuda_update_arguments: None, trizen_arguments: None, pikaur_arguments: None, pamac_arguments: None, dnf_arguments: None, nix_arguments: None, nix_env_arguments: None, apt_arguments: None, enable_tlmgr: None, redhat_distro_sync: None, suse_dup: None, rpm_ostree: None, emerge_sync_flags: None, emerge_update_flags: None, home_manager_arguments: None }), git: Some(Git { max_concurrency: None, arguments: None, repos: None, pull_predefined: None }), containers: None, windows: Some(Windows { accept_all_updates: None, self_rename: None, open_remotes_in_new_terminal: None, wsl_update_pre_release: None, wsl_update_use_web_download: None }), npm: Some(NPM { use_sudo: None }), yarn: None, vim: None, firmware: Some(Firmware { upgrade: None }), vagrant: None, flatpak: Some(Flatpak { use_sudo: None }), distrobox: Some(Distrobox { use_root: None, containers: None }), lensfun: None }
DEBUG Version: 15.0.0
DEBUG OS: x86_64-unknown-linux-musl
DEBUG Args { inner: ["topgrade", "-v"] }
DEBUG Binary path: Ok("/usr/bin/topgrade")
DEBUG self-update Feature Enabled: true
DEBUG Configuration: Config { opt: CommandLineArgs { edit_config: false, show_config_reference: false, run_in_tmux: false, cleanup: false, dry_run: false, no_retry: false, disable: [], only: [], custom_commands: [], env: [], verbose: true, keep_at_end: false, skip_notify: false, yes: None, disable_predefined_git_repos: false, config: None, remote_host_limit: None, show_skipped: false, log_filter: "warn", gen_completion: None, gen_manpage: false, no_self_update: false }, config_file: ConfigFile { include: Some(Include { paths: None }), misc: Some(Misc { pre_sudo: None, sudo_command: None, disable: Some([Containers, Lensfun, Node, Pnpm, Yarn, Nix]), ignore_failures: None, remote_topgrades: None, remote_topgrade_path: None, ssh_arguments: None, tmux_arguments: None, set_title: None, display_time: None, assume_yes: None, no_retry: None, run_in_tmux: None, cleanup: None, notify_each_step: None, skip_notify: Some(true), bashit_branch: None, only: None, no_self_update: Some(true), log_filters: None }), pre_commands: Some({}), post_commands: None, commands: Some({"dotter": "bash -c 'cd ~/.dotfiles && dotter'", "sync-packages": "~/.dotfiles/bin/sync-packages", "treesitter": "nvim --headless +TSUpdateSync +qa"}), python: Some(Python { enable_pip_review: None, enable_pip_review_local: None, enable_pipupgrade: None, pipupgrade_arguments: None }), composer: Some(Composer { self_update: None }), brew: Some(Brew { greedy_cask: None, greedy_latest: None, autoremove: None, fetch_head: None }), linux: Some(Linux { yay_arguments: None, aura_aur_arguments: None, aura_pacman_arguments: None, arch_package_manager: Some(Aura), show_arch_news: None, garuda_update_arguments: None, trizen_arguments: None, pikaur_arguments: None, pamac_arguments: None, dnf_arguments: None, nix_arguments: None, nix_env_arguments: None, apt_arguments: None, enable_tlmgr: None, redhat_distro_sync: None, suse_dup: None, rpm_ostree: None, emerge_sync_flags: None, emerge_update_flags: None, home_manager_arguments: None }), git: Some(Git { max_concurrency: None, arguments: None, repos: None, pull_predefined: None }), containers: None, windows: Some(Windows { accept_all_updates: None, self_rename: None, open_remotes_in_new_terminal: None, wsl_update_pre_release: None, wsl_update_use_web_download: None }), npm: Some(NPM { use_sudo: None }), yarn: None, vim: None, firmware: Some(Firmware { upgrade: None }), vagrant: None, flatpak: Some(Flatpak { use_sudo: None }), distrobox: Some(Distrobox { use_root: None, containers: None }), lensfun: None }, allowed_steps: [AM, AppMan, Asdf, Atom, Audit, AutoCpufreq, Bin, Bob, BrewCask, BrewFormula, Bun, BunPackages, Cargo, Certbot, Chezmoi, Chocolatey, Choosenim, ClamAvDb, Composer, Conda, ConfigUpdate, CustomCommands, DebGet, Deno, Distrobox, DkpPacman, Dotnet, Elan, Emacs, Firmware, Flatpak, Flutter, Fossil, Gcloud, Gem, Ghcup, GithubCliExtensions, GitRepos, GnomeShellExtensions, Go, Guix, Haxelib, Helm, HomeManager, Jetpack, Julia, Juliaup, Kakoune, Helix, Krew, Lure, Macports, Mamba, Miktex, Mas, Maza, Micro, Mise, Myrepos, Opam, Pacdef, Pacstall, Pearl, Pip3, PipReview, PipReviewLocal, Pipupgrade, Pipx, Pkg, Pkgin, PlatformioCore, Powershell, Protonup, Pyenv, Raco, Rcm, Remotes, Restarts, Rtcl, RubyGems, Rustup, Rye, Scoop, Sdkman, SelfUpdate, Sheldon, Shell, Snap, Sparkle, Spicetify, Stack, Stew, System, Tldr, Tlmgr, Tmux, Toolbx, Vagrant, Vcpkg, Vim, Vscode, Waydroid, Winget, Wsl, WslUpdate, Xcodes, Yadm] }
DEBUG Cannot find "pwsh"
DEBUG Cannot find "powershell"
DEBUG Path "/home/user/.config/emacs" doesn't exist
DEBUG Path "/home/user/.emacs.d" doesn't exist
DEBUG Cannot find "doas"
DEBUG Detected "/usr/bin/sudo" as "sudo"
DEBUG Step "packer.nu"
DEBUG Step "System update"

── 09:15:26 - System update ────────────────────────────────────────────────────
DEBUG Cannot find "powerpill"
DEBUG Detected "/usr/bin/aura" as "aura"
DEBUG Detected "/usr/bin/sudo" as "sudo"
DEBUG Executing command /usr/bin/sudo /usr/bin/aura -Au
aura :: Running Aura with sudo is not necessary.
DEBUG Command failed: Err(
0: Command failed: /usr/bin/sudo /usr/bin/aura -Au
1: /usr/bin/sudo failed: exit status: 1

Location:
src/steps/os/archlinux.rs:292)
DEBUG Step "System update" failed:
0: Command failed: /usr/bin/sudo /usr/bin/aura -Au
1: /usr/bin/sudo failed: exit status: 1

Location:
src/steps/os/archlinux.rs:292
System update failed:
0: Command failed: /usr/bin/sudo /usr/bin/aura -Au
1: /usr/bin/sudo failed: exit status: 1

Location:
src/steps/os/archlinux.rs:292
Retry? (y)es/(N)o/(s)hell/(q)uit

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions