From 4f5c57fdb3b6657a38f146e06843e1477ff94650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Wed, 30 Nov 2022 10:03:37 +0100 Subject: [PATCH] Detect if a package src_dir is missing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- scripts/functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/functions b/scripts/functions index 0d799ae6..09fa29af 100644 --- a/scripts/functions +++ b/scripts/functions @@ -2283,10 +2283,11 @@ CT_DoExtractPatch() CT_DoExecLog ALL rm -f "${src_dir}/.${basename}".* 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}" else CT_DoLog EXTRA "Extracting ${basename}" + CT_DoExecLog ALL rm -f "${src_dir}/.${basename}".* CT_DoExecLog ALL touch "${src_dir}/.${basename}.extracting" if [ "${src_release}" = "y" ]; then archive="${archive_filename}"