Detect if a package src_dir is missing

If a user deletes the package directory under .build/src/ but fails to
remove the hidden stamp files the CT_DoExtractPatch function will detect
this, delete the stamps and perform the full extract-and-patch step.

Signed-off-by: Joakim Nohlgård <joakim@nohlgard.se>
This commit is contained in:
Joakim Nohlgård 2022-11-30 10:03:37 +01:00 committed by Chris Packham
parent d13c526f73
commit 4f5c57fdb3

View File

@ -2283,10 +2283,11 @@ CT_DoExtractPatch()
CT_DoExecLog ALL rm -f "${src_dir}/.${basename}".* CT_DoExecLog ALL rm -f "${src_dir}/.${basename}".*
fi fi
if [ -f "${src_dir}/.${basename}.extracted" ]; then if [ -f "${src_dir}/.${basename}.extracted" -a -d "${src_dir}/${basename}" ]; then
CT_DoLog DEBUG "Already extracted ${basename}" CT_DoLog DEBUG "Already extracted ${basename}"
else else
CT_DoLog EXTRA "Extracting ${basename}" CT_DoLog EXTRA "Extracting ${basename}"
CT_DoExecLog ALL rm -f "${src_dir}/.${basename}".*
CT_DoExecLog ALL touch "${src_dir}/.${basename}.extracting" CT_DoExecLog ALL touch "${src_dir}/.${basename}.extracting"
if [ "${src_release}" = "y" ]; then if [ "${src_release}" = "y" ]; then
archive="${archive_filename}" archive="${archive_filename}"