deb: give the build-user setup and resume cleanup their own phases
The profile's build-dependency phase spanned everything between the apt passes and the build step, and for a kernel incremental build that hid ~13 minutes of housekeeping: the recursive chown handing the staged tree to the build user, and the resume_clear quirk dropping the previous attempt's stamp caches. Both now enter the profiler (ClearingResumeCaches only when the quirk has paths and a tree is carried, PreparingBuildUser only for rootless builds), so the status bar and pkh deb profile show where the time actually goes — on a large carried tree the chown dominates, which is the honest answer to a 6m30s DEPS column next to a 19m19s phase.
This commit is contained in:
+10
-3
@@ -639,8 +639,10 @@ pub async fn build(
|
||||
// with no config prerequisite) would build from the previous
|
||||
// attempt's configuration: drop the listed caches so the wrapper
|
||||
// steps re-run over the incremental inner builds.
|
||||
if build_resume {
|
||||
for rel in crate::quirks::get_resume_clear_paths(package, series) {
|
||||
let resume_clear_paths = crate::quirks::get_resume_clear_paths(package, series);
|
||||
if build_resume && !resume_clear_paths.is_empty() {
|
||||
enter_phase(view, Phase::ClearingResumeCaches, profiler);
|
||||
for rel in resume_clear_paths {
|
||||
let path = Path::new(package_dir_str).join(&rel);
|
||||
if !ctx.exists(&path).unwrap_or(false) {
|
||||
continue;
|
||||
@@ -689,7 +691,12 @@ pub async fn build(
|
||||
// LTO/make -j process flood), and a rules chown that fails for the
|
||||
// build user is cosmetic — the .deb is assembled in the binary step's
|
||||
// own fakeroot session, where files unknown to its database are
|
||||
// recorded as root-owned anyway.
|
||||
// recorded as root-owned anyway. Handing the tree over is a recursive
|
||||
// chown that can take minutes on a large carried tree, so it is a
|
||||
// phase of its own in the status bar and the profile.
|
||||
if build_user.is_some() {
|
||||
enter_phase(view, Phase::PreparingBuildUser, profiler);
|
||||
}
|
||||
let rule_ids = match build_user {
|
||||
Some(_) => {
|
||||
let workroot = Path::new(package_dir_str)
|
||||
|
||||
Reference in New Issue
Block a user