From be2c25d9cd721f2f9075adf4645d75b18bc78877 Mon Sep 17 00:00:00 2001 From: robojerk Date: Sun, 7 Sep 2025 17:24:13 -0700 Subject: [PATCH] Add debugging for apt-cacher-ng connectivity issues - Add detailed logging to apt-cacher-ng setup step - Add debugging output for apt-cacher-ng connectivity testing - This will help identify why udev package is not being installed - Should reveal if apt-cacher-ng is running and accessible The udev dependency issue persists, suggesting apt-cacher-ng is not working properly in the CI environment. --- .forgejo/workflows/ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 497d629..e0fa490 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -34,12 +34,18 @@ jobs: run: | echo "Setting up apt-cacher-ng for faster builds..." # Stop any existing apt-cacher-ng container - docker stop apt-cacher-ng 2>/dev/null || true - docker rm apt-cacher-ng 2>/dev/null || true + echo "Stopping any existing apt-cacher-ng containers..." + docker stop apt-cacher-ng 2>/dev/null || echo "No existing container to stop" + docker rm apt-cacher-ng 2>/dev/null || echo "No existing container to remove" # Start apt-cacher-ng in background with proper network configuration + echo "Starting apt-cacher-ng container..." docker run -d --name apt-cacher-ng --network host sameersbn/apt-cacher-ng:latest || echo "Apt-cacher-ng failed to start" + # Check if container is running + echo "Checking if apt-cacher-ng container is running..." + docker ps | grep apt-cacher-ng || echo "Apt-cacher-ng container not found in running containers" + # Wait for it to be ready echo "Waiting for apt-cacher-ng to be ready..." timeout 30 bash -c 'until curl -s http://localhost:3142/acng-report.html > /dev/null 2>&1; do sleep 2; done' || echo "Apt-cacher-ng not ready, continuing without cache" @@ -65,12 +71,18 @@ jobs: # Configure apt to use cacher if available # Try multiple methods to reach the apt-cacher-ng service APT_CACHER_IP="" + echo "Testing apt-cacher-ng connectivity..." if curl -s http://host.docker.internal:3142/acng-report.html > /dev/null 2>&1; then APT_CACHER_IP="host.docker.internal:3142" + echo "Found apt-cacher-ng at host.docker.internal:3142" elif curl -s http://172.17.0.1:3142/acng-report.html > /dev/null 2>&1; then APT_CACHER_IP="172.17.0.1:3142" + echo "Found apt-cacher-ng at 172.17.0.1:3142" elif curl -s http://host-gateway:3142/acng-report.html > /dev/null 2>&1; then APT_CACHER_IP="host-gateway:3142" + echo "Found apt-cacher-ng at host-gateway:3142" + else + echo "Apt-cacher-ng not accessible, testing direct connection" fi if [ -n "$APT_CACHER_IP" ]; then