Skip to content

Group G: sysup upgrade coverage for new toolchains #32

@thompsonson

Description

@thompsonson

Closes a functional gap in sysup upgrade. Today it handles brew upgrade / apt upgrade; the new toolchains introduced in groups #26#31 each have their own upgrade paths and silently drift otherwise.

Changes to dot_local/bin/executable_sysup

Extend the upgrade command with handlers, each gated on the matching command -v check and relevant install_* data flag. Ordered by cost (cheapest first) so a sysup upgrade under time pressure can Ctrl-C mid-run without missing the cheap wins.

Rust (rustup)

if command -v rustup >/dev/null 2>&1; then
  echo "==> rustup"
  rustup update
fi

Nix profile (devenv, cloud-hypervisor, virtiofsd)

if command -v nix >/dev/null 2>&1; then
  echo "==> nix profile"
  nix profile upgrade '.*'
fi

Cargo-installed binaries (tauri-cli, create-tauri-app, any future cargo install)

Requires cargo-update to be installed; add cargo install cargo-update --locked to the Rust bootstrap (#28) or install on first upgrade run.

if command -v cargo-install-update >/dev/null 2>&1; then
  echo "==> cargo install-update"
  cargo install-update -a
fi

Google Cloud components

if command -v gcloud >/dev/null 2>&1; then
  echo "==> gcloud components"
  gcloud components update --quiet
fi

Android SDK (opt-in only)

Gated on {{ if .install_android }} and [ -d "$HOME/Android/Sdk" ]:

if command -v sdkmanager >/dev/null 2>&1; then
  echo "==> Android SDK"
  sdkmanager --update
fi

Also touch sysup status

The status command should show outdated counts for each of these too — minimally, call rustup check, nix profile list with a staleness heuristic, and gcloud components list --filter='state.name=Update Available'. If that's more than a line or two per tool, defer to a follow-up; the upgrade path is the priority.

Verification checklist

  • sysup upgrade on a machine with only apt/brew tools works identically to today (no new errors from missing binaries).
  • sysup upgrade on a machine with nix+rustup+gcloud runs all five new handlers in order.
  • Ctrl-C mid-run leaves the system in a consistent state (each handler is atomic enough).
  • sysup upgrade with install_android=false does not attempt sdkmanager.
  • sysup doctor still reports correct versions after an upgrade.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions