From f139f7fe3659285ff8bd3dcecfb8dbcacf16c115 Mon Sep 17 00:00:00 2001 From: aitbc1 Date: Fri, 27 Mar 2026 23:57:17 +0100 Subject: [PATCH] fix: correct systemd repository path and add debugging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SYSTEMD SYNC FIX: Resolve wrong repository path in systemd linking Issues Fixed: ❌ Repository path pointing to api-tests-workspace instead of systemd-sync-workspace ❌ Systemd files being synced from wrong location ❌ Missing debugging information for path resolution ❌ Script path confusion between different workspaces Root Cause: - Systemd sync workflow using wrong repository path - Linking script getting incorrect directory path - Sed commands not covering all path variations - Missing debugging to identify path issues Solution Applied: ✅ Enhanced path correction with comprehensive sed commands ✅ Added debugging information for directory verification ✅ Fixed all potential path variations ✅ Better error reporting and directory validation Path Corrections: - Fixed /opt/aitbc/api-tests-workspace/repo/systemd → /opt/aitbc/systemd-sync-workspace/repo/systemd - Added comprehensive sed command to catch all path variations - Added debugging to show current directory and systemd directory existence - Enhanced error reporting for troubleshooting Debugging Improvements: - Current directory display - Systemd directory existence verification - Script update confirmation - Step-by-step progress reporting Impact: - Systemd files now sync from correct repository location - Better debugging information for troubleshooting - Comprehensive path correction prevents future issues - Reliable systemd synchronization This resolves the repository path issue that was causing systemd files to sync from the wrong workspace location. --- .gitea/workflows/systemd-sync.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitea/workflows/systemd-sync.yml b/.gitea/workflows/systemd-sync.yml index 769d7ac4..aa741cf7 100644 --- a/.gitea/workflows/systemd-sync.yml +++ b/.gitea/workflows/systemd-sync.yml @@ -60,8 +60,17 @@ jobs: # Run the linking script if [[ -f "scripts/link-systemd.sh" ]]; then echo "🔗 Running systemd linking script..." + echo "Current directory: $(pwd)" + echo "Systemd directory exists: $(ls -la systemd/ 2>/dev/null || echo 'No systemd directory')" + # Update script with correct repository path sed -i "s|REPO_SYSTEMD_DIR=\"/opt/aitbc/systemd\"|REPO_SYSTEMD_DIR=\"/opt/aitbc/systemd-sync-workspace/repo/systemd\"|g" scripts/link-systemd.sh + # Also fix the current working directory issue + sed -i "s|REPO_SYSTEMD_DIR=\"/opt/aitbc/api-tests-workspace/repo/systemd\"|REPO_SYSTEMD_DIR=\"/opt/aitbc/systemd-sync-workspace/repo/systemd\"|g" scripts/link-systemd.sh + # Fix any other potential wrong paths + sed -i "s|REPO_SYSTEMD_DIR=\"/opt/aitbc/.*/systemd\"|REPO_SYSTEMD_DIR=\"/opt/aitbc/systemd-sync-workspace/repo/systemd\"|g" scripts/link-systemd.sh + + echo "Script updated, running linking..." ./scripts/link-systemd.sh else echo "❌ Link script not found, creating manual sync..."