fix(lib,install): update locking doc to SQLite transaction, cache NFS check, verify PyYAML

This commit is contained in:
2026-06-23 23:41:18 +09:00
parent 25cf729040
commit 7eaaaf8944
8 changed files with 47 additions and 37 deletions
+9 -1
View File
@@ -42,6 +42,14 @@ else
exit 1
fi
# Verify PyYAML (needed by system python3 for atomic state writes)
if ! python3 -c "import yaml" &>/dev/null; then
echo "❌ Error: 'PyYAML' is not installed in the system python3. Please install it first" >&2
echo " (e.g., 'pip3 install PyYAML' or 'sudo apt-get install python3-yaml')." >&2
exit 1
fi
echo "✅ PyYAML (system dependency) detected."
# --- 2. Workspace Setup ---
mkdir -p "$TARGET_DIR"
cd "$TARGET_DIR"
@@ -79,7 +87,7 @@ if command -v df &>/dev/null && command -v mount &>/dev/null; then
if [ -n "$MOUNTPOINT" ]; then
if mount | grep -q "$MOUNTPOINT.*nfs\|$MOUNTPOINT.*cifs\|$MOUNTPOINT.*fuse.sshfs"; then
echo "⚠️ WARNING: Target directory is on a network filesystem (NFS/CIFS/SSHFS)."
echo " File locks (fcntl.flock) are UNRELIABLE on network storage."
echo " SQLite WAL journaling and file locks are UNRELIABLE on network storage."
echo " The sqlite3 registry will fall back to 'DELETE' journaling instead of WAL."
else
echo "✅ File system supports WAL (Local storage detected)."