From d2bb65ed26259f06c1eb8ddca74053a46b50435c Mon Sep 17 00:00:00 2001 From: Wildan M Date: Thu, 13 Nov 2025 18:53:29 +0700 Subject: [PATCH 1/2] Fix recipe push stat --- src/bin/repo.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bin/repo.rs b/src/bin/repo.rs index 341cd0e7..a111f5aa 100644 --- a/src/bin/repo.rs +++ b/src/bin/repo.rs @@ -654,7 +654,11 @@ fn handle_push(recipes: &Vec, config: &CliConfig) -> anyhow::Result< "", i == num_roots - 1, &match metadata { - Ok(m) => WalkTreeEntry::Built(&archive_path, m.len()), + Ok(m) => { + total_size += m.len(); + visited.insert(root.name.clone()); + WalkTreeEntry::Built(&archive_path, m.len()) + } Err(_) => WalkTreeEntry::NotBuilt, }, )?; From 5af936d35ff008b20968162a82a6c684fa0a3f9c Mon Sep 17 00:00:00 2001 From: Wildan M Date: Thu, 13 Nov 2025 18:57:38 +0700 Subject: [PATCH 2/2] Fix grammar --- src/bin/repo.rs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/bin/repo.rs b/src/bin/repo.rs index a111f5aa..9cbc417b 100644 --- a/src/bin/repo.rs +++ b/src/bin/repo.rs @@ -668,9 +668,14 @@ fn handle_push(recipes: &Vec, config: &CliConfig) -> anyhow::Result< if config.cook.verbose { println!(""); println!( - "Pushed {} of {} packages", + "Pushed {} of {} {}", format_size(total_size), - visited.len() + visited.len(), + if visited.len() == 1 { + "package" + } else { + "packages" + }, ); } @@ -697,9 +702,14 @@ fn handle_tree(recipes: &Vec, _config: &CliConfig) -> anyhow::Result println!(""); println!( - "Estimated image size: {} of {} packages", + "Estimated image size: {} of {} {}", format_size(total_size), - visited.len() + visited.len(), + if visited.len() == 1 { + "package" + } else { + "packages" + }, ); Ok(())