topgrade-rs / topgrade

Upgrade all the things
GNU General Public License v3.0
1.87k stars 122 forks source link

Fedora sway atomic detected as regular #783

Closed Ghoelian closed 3 months ago

Ghoelian commented 4 months ago

Erroneous Behavior

After rebasing to Fedora sway atomic 40, topgrade tries to update system packages using yum upgrade. This fails because yum is not installed on the host system.

Expected Behavior

Topgrade should detect it's running on an atomic distro, and run rpm-ostree update instead.

Steps to reproduce

Rebase Fedora Sericea 39 to Fedora Sway Atomic 40, and run topgrade.

Possible Cause (Optional)

I think this is because the Fedora atomic spins have been renamed, in my case from Fedora Sericea to Fedora Sway Atomic.

Problem persists without calling from topgrade

Did you run topgrade through Remote Execution

Configuration file (Optional)

Additional Details

Verbose Output (topgrade -v)

DEBUG Configuration at /home/julian/.config/topgrade.toml
DEBUG Loaded configuration: ConfigFile { include: Some(Include { paths: None }), misc: Some(Misc { pre_sudo: Some(true), sudo_command: None, disable: None, ignore_failures: Some([Pnpm]), remote_topgrades: None, remote_topgrade_path: None, ssh_arguments: None, tmux_arguments: None, set_title: None, display_time: None, assume_yes: Some(true), no_retry: None, run_in_tmux: None, cleanup: None, notify_each_step: None, skip_notify: None, bashit_branch: None, only: None, no_self_update: None, log_filters: None }), pre_commands: Some({}), post_commands: Some({}), commands: Some({}), 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, autoremove: None }), linux: Some(Linux { yay_arguments: None, aura_aur_arguments: None, aura_pacman_arguments: None, arch_package_manager: None, 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: Some(Containers { ignored_containers: None }), windows: Some(Windows { accept_all_updates: None, self_rename: None, open_remotes_in_new_terminal: None, enable_winget: None, wsl_update_pre_release: None, wsl_update_use_web_download: None }), npm: Some(NPM { use_sudo: None }), yarn: Some(Yarn { use_sudo: None }), vim: Some(Vim { force_plug_update: None }), firmware: Some(Firmware { upgrade: None }), vagrant: Some(Vagrant { directories: None, power_on: None, always_suspend: None }), flatpak: Some(Flatpak { use_sudo: None }), distrobox: Some(Distrobox { use_root: None, containers: None }) }
DEBUG Version: 14.0.1
DEBUG OS: x86_64-unknown-linux-gnu
DEBUG Args { inner: ["topgrade", "-v"] }
DEBUG Binary path: Ok("/var/home/julian/.cargo/bin/topgrade")
DEBUG self-update Feature Enabled: false
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: Some(true), sudo_command: None, disable: None, ignore_failures: Some([Pnpm]), remote_topgrades: None, remote_topgrade_path: None, ssh_arguments: None, tmux_arguments: None, set_title: None, display_time: None, assume_yes: Some(true), no_retry: None, run_in_tmux: None, cleanup: None, notify_each_step: None, skip_notify: None, bashit_branch: None, only: None, no_self_update: None, log_filters: None }), pre_commands: Some({}), post_commands: Some({}), commands: Some({}), 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, autoremove: None }), linux: Some(Linux { yay_arguments: None, aura_aur_arguments: None, aura_pacman_arguments: None, arch_package_manager: None, 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: Some(Containers { ignored_containers: None }), windows: Some(Windows { accept_all_updates: None, self_rename: None, open_remotes_in_new_terminal: None, enable_winget: None, wsl_update_pre_release: None, wsl_update_use_web_download: None }), npm: Some(NPM { use_sudo: None }), yarn: Some(Yarn { use_sudo: None }), vim: Some(Vim { force_plug_update: None }), firmware: Some(Firmware { upgrade: None }), vagrant: Some(Vagrant { directories: None, power_on: None, always_suspend: None }), flatpak: Some(Flatpak { use_sudo: None }), distrobox: Some(Distrobox { use_root: None, containers: None }) }, allowed_steps: [AM, AppMan, Asdf, Atom, Audit, Bin, Bob, BrewCask, BrewFormula, Bun, BunPackages, Cargo, Chezmoi, Chocolatey, Choosenim, Composer, Conda, ConfigUpdate, Containers, CustomCommands, DebGet, Deno, Distrobox, DkpPacman, Dotnet, 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, Myrepos, Nix, Node, Opam, Pacdef, Pacstall, Pearl, Pip3, PipReview, PipReviewLocal, Pipupgrade, Pipx, Pkg, Pkgin, Pnpm, Powershell, Protonup, Raco, Rcm, Remotes, Restarts, Rtcl, RubyGems, Rustup, Scoop, Sdkman, SelfUpdate, Sheldon, Shell, Snap, Sparkle, Spicetify, Stack, Stew, System, Tldr, Tlmgr, Tmux, Toolbx, Vagrant, Vcpkg, Vim, Vscode, Winget, Wsl, WslUpdate, Yadm, Yarn] }
DEBUG Detected "/usr/bin/git" as "git"
DEBUG Cannot find "pwsh"
DEBUG Cannot find "powershell"
DEBUG Path "/home/julian/.config/emacs" doesn't exist
DEBUG Path "/home/julian/.emacs.d" doesn't exist
DEBUG Cannot find "doas"
DEBUG Detected "/usr/bin/sudo" as "sudo"

── 15:47:42 - Sudo ─────────────────────────────────────────────────────────────
DEBUG Executing command `/usr/bin/sudo -v`
DEBUG Step "packer.nu"
DEBUG Step "System update"

── 15:47:42 - System update ────────────────────────────────────────────────────
DEBUG Detected "/usr/bin/rpm-ostree" as "rpm-ostree"
DEBUG Cannot find "dnf"
DEBUG Executing command `/usr/bin/sudo yum upgrade -y`
sudo: yum: command not found
DEBUG Command failed: Err(
   0: Command failed: `/usr/bin/sudo yum upgrade -y`
   1: `/usr/bin/sudo` failed: exit status: 1

Location:
   /home/julian/.cargo/registry/src/index.crates.io-6f17d22bba15001f/topgrade-14.0.1/src/steps/os/linux.rs:231)
DEBUG Step "System update" failed:
   0: Command failed: `/usr/bin/sudo yum upgrade -y`
   1: `/usr/bin/sudo` failed: exit status: 1

Location:
   /home/julian/.cargo/registry/src/index.crates.io-6f17d22bba15001f/topgrade-14.0.1/src/steps/os/linux.rs:231
System update failed:
   0: Command failed: `/usr/bin/sudo yum upgrade -y`
   1: `/usr/bin/sudo` failed: exit status: 1

Location:
   /home/julian/.cargo/registry/src/index.crates.io-6f17d22bba15001f/topgrade-14.0.1/src/steps/os/linux.rs:231
Ghoelian commented 4 months ago

Here's my /etc/os-release, if that's useful to you at all:

NAME="Fedora Linux"
VERSION="40.20240426.0 (Sway Atomic)"
ID=fedora
VERSION_ID=40
VERSION_CODENAME=""
PLATFORM_ID="platform:f40"
PRETTY_NAME="Fedora Linux 40.20240426.0 (Sway Atomic)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:40"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/atomic-desktops/sway/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora-sericea/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://gitlab.com/fedora/sigs/sway/SIG/-/issues"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=40
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=40
SUPPORT_END=2025-05-13
VARIANT="Sway Atomic"
VARIANT_ID=sway-atomic
OSTREE_VERSION='40.20240426.0'