From 5456c63a08e563887e3e4a9a0194e7bead7189cf Mon Sep 17 00:00:00 2001 From: Dorian Date: Thu, 2 Apr 2026 13:04:10 +0100 Subject: [PATCH] fix: AIUI copy uses rsync to handle same-file in CI workspace The CI build server's /opt/archipelago/web-ui/aiui resolves to the same path as the build workspace. cp -r fails with "same file" error which aborts the build under set -e. Use rsync instead (handles same-src/dest gracefully), with cp fallback + || true. This was the root cause of CI build #373 failure. Co-Authored-By: Claude Opus 4.6 (1M context) --- image-recipe/build-auto-installer-iso.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/image-recipe/build-auto-installer-iso.sh b/image-recipe/build-auto-installer-iso.sh index b7380a57..c9883510 100755 --- a/image-recipe/build-auto-installer-iso.sh +++ b/image-recipe/build-auto-installer-iso.sh @@ -985,7 +985,12 @@ for AIUI_DIR in \ if [ -d "$AIUI_DIR" ] && [ -f "$AIUI_DIR/index.html" ]; then echo " Including AIUI from $AIUI_DIR..." mkdir -p "$ARCH_DIR/web-ui/aiui" - cp -r "$AIUI_DIR/"* "$ARCH_DIR/web-ui/aiui/" + # Use rsync to handle same-file (CI workspace == /opt/archipelago) gracefully + if command -v rsync >/dev/null 2>&1; then + rsync -a "$AIUI_DIR/" "$ARCH_DIR/web-ui/aiui/" + else + cp -r "$AIUI_DIR/"* "$ARCH_DIR/web-ui/aiui/" 2>/dev/null || true + fi echo " ✅ AIUI included ($(du -sh "$ARCH_DIR/web-ui/aiui" | cut -f1))" AIUI_INCLUDED=1 break