fix: skip external MariaDB repo on trixie, clean stale repo files
Some checks failed
CI / test WordOps (ubuntu-22.04) (push) Has been cancelled
CI / test WordOps (ubuntu-24.04) (push) Has been cancelled

- Trixie uses native Debian mariadb packages (external repo has no
  trixie release), so wo_mysql_repo is empty and repo add is skipped
- Clean up old openlitespeed.list and mariadb.list during install so
  they get regenerated with correct GPG keyring paths

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-09 11:39:33 +01:00
parent 317181e4be
commit 3585aca1ad
3 changed files with 16 additions and 5 deletions

View File

@@ -172,6 +172,9 @@ class WOVar():
"mariadb-common", "python3-mysqldb"]
if wo_distro == 'raspbian':
mariadb_ver = '10.3'
elif wo_platform_codename == 'trixie':
mariadb_ver = ''
wo_mysql = wo_mysql + ["mariadb-backup"]
else:
mariadb_ver = '11.4'
wo_mysql = wo_mysql + ["mariadb-backup"]
@@ -182,9 +185,13 @@ class WOVar():
wo_clamav = ["clamav", "clamav-freshclam"]
# APT repositories
wo_mysql_repo = ("deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] "
"http://deb.mariadb.org/"
f"{mariadb_ver}/{wo_distro} {wo_platform_codename} main")
if mariadb_ver:
wo_mysql_repo = ("deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] "
"http://deb.mariadb.org/"
f"{mariadb_ver}/{wo_distro} {wo_platform_codename} main")
else:
# trixie: use native Debian mariadb packages, no external repo
wo_mysql_repo = ""
mariadb_repo_key = "https://mariadb.org/mariadb_release_signing_key.pgp"
if wo_distro == 'ubuntu':
# LSPHP comes from LiteSpeed repo (same as OLS)