ci(release): flush apt cache and force fresh mirror package index to fix 404 security packages
CI Test Suite / Run Component Tests & Pipeline Verification (push) Successful in 1m32s
Release Binaries & Packages / Build & Release Standalone Binaries (Linux & Windows Cross-Compilation) (push) Successful in 1m33s

This commit is contained in:
2026-09-26 14:06:35 +02:00
parent b33294f36c
commit 25adb46d48
2 changed files with 14 additions and 9 deletions
+6 -5
View File
@@ -35,15 +35,16 @@ jobs:
if command -v apt-get >/dev/null 2>&1; then
echo "[*] Installing Python shared libraries, headers, NSIS via apt-get..."
export DEBIAN_FRONTEND=noninteractive
$SUDO rm -rf /var/lib/apt/lists/* /var/cache/apt/* || true
$SUDO apt-get clean || true
$SUDO apt-get update --allow-releaseinfo-change -y || $SUDO apt-get update -y || true
$SUDO apt-get update --allow-releaseinfo-change -o Acquire::Check-Valid-Until=false -y || $SUDO apt-get update -y || true
PY_VER=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')" 2>/dev/null || echo "3.9")
echo "[*] Detected Python version: ${PY_VER}"
$SUDO apt-get install -y --allow-unauthenticated --no-install-recommends \
nsis "libpython${PY_VER}" "libpython${PY_VER}-dev" "python${PY_VER}-dev" \
$SUDO apt-get install -y --fix-missing --allow-unauthenticated --no-install-recommends \
nsis nsis-common "libpython${PY_VER}" "libpython${PY_VER}-dev" "python${PY_VER}-dev" \
python3-dev libpython3-dev build-essential gcc make curl tar gzip zip unzip || true
for pkg in nsis "libpython${PY_VER}" "libpython${PY_VER}-dev" "python${PY_VER}-dev" python3-dev libpython3-dev build-essential; do
$SUDO apt-get install -y --allow-unauthenticated --no-install-recommends "$pkg" || true
for pkg in nsis nsis-common "libpython${PY_VER}" "libpython${PY_VER}-dev" "python${PY_VER}-dev" python3-dev libpython3-dev build-essential; do
$SUDO apt-get install -y --fix-missing --allow-unauthenticated --no-install-recommends "$pkg" || true
done
echo "[*] Verifying makensis:"
which makensis || echo "makensis not in PATH"
+8 -4
View File
@@ -150,8 +150,10 @@ def ensure_makensis():
sudo = ["sudo"] if hasattr(os, "geteuid") and os.geteuid() != 0 and shutil.which("sudo") else []
if shutil.which("apt-get"):
try:
subprocess.run(sudo + ["apt-get", "update", "--allow-releaseinfo-change", "-y"], check=False)
subprocess.run(sudo + ["apt-get", "install", "-y", "--no-install-recommends", "nsis"], check=False)
subprocess.run(sudo + ["rm", "-rf", "/var/lib/apt/lists/*", "/var/cache/apt/*"], check=False)
subprocess.run(sudo + ["apt-get", "clean"], check=False)
subprocess.run(sudo + ["apt-get", "update", "--allow-releaseinfo-change", "-o", "Acquire::Check-Valid-Until=false", "-y"], check=False)
subprocess.run(sudo + ["apt-get", "install", "-y", "--fix-missing", "--no-install-recommends", "nsis", "nsis-common"], check=False)
except Exception as e:
print(f"[!] Warning: Dynamic apt install failed: {e}")
elif shutil.which("apk"):
@@ -179,8 +181,10 @@ def ensure_libpython():
py_ver = f"{sys.version_info.major}.{sys.version_info.minor}"
sudo = ["sudo"] if hasattr(os, "geteuid") and os.geteuid() != 0 and shutil.which("sudo") else []
try:
subprocess.run(sudo + ["apt-get", "update", "--allow-releaseinfo-change", "-y"], check=False)
subprocess.run(sudo + ["apt-get", "install", "-y", "--no-install-recommends", f"libpython{py_ver}", "python3-dev", f"python{py_ver}-dev"], check=False)
subprocess.run(sudo + ["rm", "-rf", "/var/lib/apt/lists/*", "/var/cache/apt/*"], check=False)
subprocess.run(sudo + ["apt-get", "clean"], check=False)
subprocess.run(sudo + ["apt-get", "update", "--allow-releaseinfo-change", "-o", "Acquire::Check-Valid-Until=false", "-y"], check=False)
subprocess.run(sudo + ["apt-get", "install", "-y", "--fix-missing", "--no-install-recommends", f"libpython{py_ver}", "python3-dev", f"python{py_ver}-dev", "libpython3-dev"], check=False)
except Exception:
pass