2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-09-12 12:36:23 +00:00

fix(mockbuild-all): scrub the chroot a noarch step built in

A noarch builder of a forcearch target runs in the native chroot of the
release, but its cleanup step was registered against the target
configuration. The step scrubbed a chroot that did not exist and left the
native bootstrap behind on every run, one per noarch step.

Compute the configuration once per step and scrub the same one it built in.
This commit is contained in:
Vinícius Ferrão
2026-09-08 16:53:55 -03:00
parent a17df594c9
commit a7c122b113
+3 -2
View File
@@ -651,9 +651,10 @@ if (!$skip_build) {
my $step_result = "$build_root/$name";
my $step_log = "$log_root/$name";
my $step_uniqueext = build_mock_uniqueext($run_id, ++$build_step_seq, $name);
my $mock_cfg = $builder->{noarch} ? $profile->{noarch_cfg} : $target;
my $cmd = join(' ',
'perl', shell_quote($script),
'--mock-cfg', shell_quote($builder->{noarch} ? $profile->{noarch_cfg} : $target),
'--mock-cfg', shell_quote($mock_cfg),
($profile->{forcearch} && !$builder->{noarch} ? ('--target-arch', shell_quote($arch)) : ()),
'--mock-uniqueext', shell_quote($step_uniqueext),
'--result-dir', shell_quote($step_result),
@@ -676,7 +677,7 @@ if (!$skip_build) {
cmd => $cmd,
timeout => $step_timeout,
log => "$log_root/$name/run.log",
scrub_cfg => $target,
scrub_cfg => $mock_cfg,
scrub_uniqueext => $step_uniqueext,
};
push @collect_roots, $step_result;