fix(iso): rebuild image after memtest recovery
This commit is contained in:
@@ -440,6 +440,19 @@ copy_memtest_from_deb() {
|
|||||||
rm -rf "$tmpdir"
|
rm -rf "$tmpdir"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reset_live_build_stage() {
|
||||||
|
lb_dir="$1"
|
||||||
|
stage="$2"
|
||||||
|
|
||||||
|
for root in \
|
||||||
|
"$lb_dir/.build" \
|
||||||
|
"$lb_dir/.stage" \
|
||||||
|
"$lb_dir/auto"; do
|
||||||
|
[ -d "$root" ] || continue
|
||||||
|
find "$root" -maxdepth 1 \( -name "${stage}" -o -name "${stage}.*" -o -name "*${stage}*" \) -exec rm -rf {} + 2>/dev/null || true
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
recover_iso_memtest() {
|
recover_iso_memtest() {
|
||||||
lb_dir="$1"
|
lb_dir="$1"
|
||||||
iso_path="$2"
|
iso_path="$2"
|
||||||
@@ -504,9 +517,17 @@ recover_iso_memtest() {
|
|||||||
echo "memtest recovery: WARNING: missing $isolinux_cfg"
|
echo "memtest recovery: WARNING: missing $isolinux_cfg"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
reset_live_build_stage "$lb_dir" "binary_checksums"
|
||||||
|
reset_live_build_stage "$lb_dir" "binary_iso"
|
||||||
|
reset_live_build_stage "$lb_dir" "binary_zsync"
|
||||||
|
|
||||||
run_optional_step_sh "rebuild live-build checksums after memtest recovery" "91-lb-checksums" "lb binary_checksums 2>&1"
|
run_optional_step_sh "rebuild live-build checksums after memtest recovery" "91-lb-checksums" "lb binary_checksums 2>&1"
|
||||||
run_optional_step_sh "rebuild ISO after memtest recovery" "92-lb-binary-iso" "rm -f '$iso_path' && lb binary_iso 2>&1"
|
run_optional_step_sh "rebuild ISO after memtest recovery" "92-lb-binary-iso" "rm -f '$iso_path' && lb binary_iso 2>&1"
|
||||||
run_optional_step_sh "rebuild zsync after memtest recovery" "93-lb-zsync" "lb binary_zsync 2>&1"
|
run_optional_step_sh "rebuild zsync after memtest recovery" "93-lb-zsync" "lb binary_zsync 2>&1"
|
||||||
|
|
||||||
|
if [ ! -f "$iso_path" ]; then
|
||||||
|
memtest_fail "ISO rebuild was skipped or failed after memtest recovery: $iso_path" "$iso_path"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
AUDIT_VERSION_EFFECTIVE="$(resolve_audit_version)"
|
AUDIT_VERSION_EFFECTIVE="$(resolve_audit_version)"
|
||||||
|
|||||||
Reference in New Issue
Block a user