start-os
start-os copied to clipboard
Make install progress visible from the CLI
It would be nice to know what the install progress was even in a CLI context
Reported by @chrisguida
nifty progress bar lib https://github.com/mitsuhiko/indicatif
The install progress of what?
@mirkoRainer all installs. Was picturing package installs when I wrote this, but I suppose it could be implemented for OS updates as well.
The install progress of what?
Currently you can see install progress in the UI dashboard but if you do a package install from the CLI you don't get any feedback about the progress of the install at the CLI. This ticket is to give a CLI style progress bar.
The approach to this would be to connect to the patchdb websocket feed and listen for diffs in the progress of the package being installed. After each update you would correspondingly update the progress bar.
Am I correct in assuming that backend->src->install->mod.rs->cli_install
would be an appropriate place to monitor the progress? Or maybe Line 125
pub async fn install
?
It seems like there are two ways of installations, package.sideload
and package.install
.
I assume that package.install
is the one to focus on.
If I'm in the right place, I assume that the progress bar would be external to this code but would be triggered concurrently while awaiting the cli_install
code?
I'm also going to have to read up on and understand more about what
#[command(
custom_cli(cli_install(async, context(CliContext))),
display(display_none)
)]
#[instrument(skip(ctx))]
pub async fn install(
does. And perhaps that will help me decide where to start.
The more I read this, the more I'm inclined to think the progress bar will be an async tokio call within install
?
fwiw, I'm new to Rust with little practical application so thank you in advance for fielding my questions.
Both would be nice actually. Sideloading refers to when you are installing a .s9pk that you have locally vs from a marketplace.