]> git.proxmox.com Git - pve-installer.git/commitdiff
auto installer: report every progress update and include text
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 Apr 2024 16:57:16 +0000 (18:57 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 Apr 2024 16:57:19 +0000 (18:57 +0200)
now that we do not print about extracting every package through stderr
we can explicitly log progress output without duplicating lots of
information

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
proxmox-auto-installer/src/bin/proxmox-auto-installer.rs

index 2e7d20d65ece3cac86a9c3e129d2d46d873481b6..9fcec1e206b2759be78f2b0a4ab65b5c2f25c050 100644 (file)
@@ -123,7 +123,6 @@ fn run_installation(
         }
     };
 
-    let mut cur_counter = 111;
     let mut inner = || -> Result<()> {
         let reader = child
             .stdout
@@ -158,12 +157,9 @@ fn run_installation(
                 LowLevelMessage::Prompt { query } => {
                     bail!("Got interactive prompt I cannot answer: {query}")
                 }
-                LowLevelMessage::Progress { ratio, text: _ } => {
-                    let counter = (ratio * 100.).floor() as usize;
-                    if counter != cur_counter {
-                        cur_counter = counter;
-                        info!("Progress: {counter:>3}%");
-                    }
+                LowLevelMessage::Progress { ratio, text } => {
+                    let percentage = ratio * 100.;
+                    info!("progress {percentage:>5.1} % - {text}");
                 }
                 LowLevelMessage::Finished { state, message } => {
                     if state == "err" {