From 5d0509fc15e11fc970524d62cc9e7953dc0e878f Mon Sep 17 00:00:00 2001 From: vasilito Date: Sat, 20 Jun 2026 20:09:18 +0300 Subject: [PATCH] tlc: use install command for atomic copy+chmod in recipe --- local/recipes/tui/tlc/recipe.toml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/local/recipes/tui/tlc/recipe.toml b/local/recipes/tui/tlc/recipe.toml index d621f21610..46740fe313 100644 --- a/local/recipes/tui/tlc/recipe.toml +++ b/local/recipes/tui/tlc/recipe.toml @@ -47,11 +47,10 @@ mkdir -p "${COOKBOOK_STAGE}/usr/bin" for bin in tlc tlcedit tlcview tlc-pty-login; do if [ -f "${TARGET_DIR}/${bin}" ]; then - cp "${TARGET_DIR}/${bin}" "${COOKBOOK_STAGE}/usr/bin/${bin}" - if [ -f "${COOKBOOK_STAGE}/usr/bin/${bin}" ]; then - chmod 0755 "${COOKBOOK_STAGE}/usr/bin/${bin}" - else - echo "cookbook: copy failed for ${bin}" + install -m 0755 "${TARGET_DIR}/${bin}" "${COOKBOOK_STAGE}/usr/bin/${bin}" || \ + cp "${TARGET_DIR}/${bin}" "${COOKBOOK_STAGE}/usr/bin/${bin}" && chmod 0755 "${COOKBOOK_STAGE}/usr/bin/${bin}" + if [ ! -f "${COOKBOOK_STAGE}/usr/bin/${bin}" ]; then + echo "cookbook: WARNING - ${bin} was not staged (sandbox may have prevented write)" fi else echo "cookbook: skipping ${bin} (not built)"