fix: skip external MariaDB repo on trixie, clean stale repo files
- 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:
4
install
4
install
@@ -859,6 +859,10 @@ wo_init_variables
|
||||
_run wo_clean_repo
|
||||
_run wo_download_gpg_keys
|
||||
|
||||
# clean up stale repo list files so they get regenerated correctly
|
||||
rm -f /etc/apt/sources.list.d/openlitespeed.list 2>/dev/null
|
||||
rm -f /etc/apt/sources.list.d/mariadb.list 2>/dev/null
|
||||
|
||||
if [ -z "$wo_force_install" ]; then
|
||||
# check distribution support
|
||||
wo_check_distro
|
||||
|
||||
@@ -27,8 +27,8 @@ def pre_pref(self, apt_packages):
|
||||
"""Pre settings to do before installation packages"""
|
||||
|
||||
if ("mariadb-server" in apt_packages or "mariadb-client" in apt_packages):
|
||||
# add mariadb repository excepted on raspbian and ubuntu 19.04
|
||||
if not (WOVar.wo_distro == 'raspbian'):
|
||||
# add mariadb repository excepted on raspbian, trixie (uses native pkgs)
|
||||
if not (WOVar.wo_distro == 'raspbian') and WOVar.wo_mysql_repo:
|
||||
Log.info(self, "Adding repository for MySQL, please wait...")
|
||||
mysql_pref = (
|
||||
"Package: *\nPin: origin deb.mariadb.org"
|
||||
|
||||
@@ -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
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user