mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-17 23:44:17 +08:00
Make build stats count missing build
This commit is contained in:
parent
448da392ac
commit
81837d0198
@ -841,16 +841,30 @@ fn handle_tree(
|
||||
}
|
||||
|
||||
println!("");
|
||||
println!(
|
||||
"Estimated image size: {} of {} {}",
|
||||
tree::format_size(total_size),
|
||||
visited.len(),
|
||||
if visited.len() == 1 {
|
||||
"package"
|
||||
} else {
|
||||
"packages"
|
||||
},
|
||||
);
|
||||
if is_build_tree {
|
||||
println!(
|
||||
"Build summary: {} need build, {} may rebuild, with total of {} {}",
|
||||
total_size,
|
||||
roots.len(),
|
||||
visited.len(),
|
||||
if visited.len() == 1 {
|
||||
"recipe"
|
||||
} else {
|
||||
"recipes"
|
||||
},
|
||||
);
|
||||
} else {
|
||||
println!(
|
||||
"Estimated image size: {} of {} {}",
|
||||
tree::format_size(total_size),
|
||||
visited.len(),
|
||||
if visited.len() == 1 {
|
||||
"package"
|
||||
} else {
|
||||
"packages"
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@ -72,8 +72,14 @@ pub fn walk_tree_entry(
|
||||
}
|
||||
|
||||
visited.insert(package_name.clone());
|
||||
if let WalkTreeEntry::Built(_p, pkg_size) = &entry {
|
||||
*total_size += pkg_size;
|
||||
if is_build_tree {
|
||||
if matches!(entry, WalkTreeEntry::NotBuilt) {
|
||||
*total_size += 1;
|
||||
}
|
||||
} else {
|
||||
if let WalkTreeEntry::Built(_p, pkg_size) = &entry {
|
||||
*total_size += pkg_size;
|
||||
}
|
||||
}
|
||||
let pkg_meta: Package;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user