Update tools.func
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
This commit is contained in:
parent
098afdb9dc
commit
300db370f0
@ -2308,30 +2308,31 @@ function setup_mysql() {
|
|||||||
# Cleanup old repository files
|
# Cleanup old repository files
|
||||||
cleanup_old_repo_files "mysql"
|
cleanup_old_repo_files "mysql"
|
||||||
|
|
||||||
# MySQL compatibility check for Debian Trixie
|
# Determine suite - use bookworm for Debian testing/unstable
|
||||||
if [[ "$DISTRO_ID" == "debian" && "$DISTRO_CODENAME" =~ ^(trixie|forky|sid)$ ]]; then
|
|
||||||
msg_error "MySQL is not compatible with Debian ${DISTRO_CODENAME}"
|
|
||||||
msg_info "Use MariaDB instead: MARIADB_VERSION=\"11.4\" setup_mariadb"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Determine suite
|
|
||||||
local SUITE
|
local SUITE
|
||||||
|
if [[ "$DISTRO_ID" == "debian" ]]; then
|
||||||
case "$DISTRO_CODENAME" in
|
case "$DISTRO_CODENAME" in
|
||||||
bookworm | bullseye)
|
bookworm | bullseye)
|
||||||
SUITE="$DISTRO_CODENAME"
|
SUITE="$DISTRO_CODENAME"
|
||||||
;;
|
;;
|
||||||
|
trixie | forky | sid)
|
||||||
|
msg_warn "Using MySQL Bookworm packages on Debian ${DISTRO_CODENAME}"
|
||||||
|
SUITE="bookworm"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
# For Ubuntu
|
SUITE="bookworm" # Fallback to bookworm for unknown Debian versions
|
||||||
SUITE=$(get_fallback_suite "$DISTRO_ID" "$DISTRO_CODENAME" "https://repo.mysql.com/apt/${DISTRO_ID}")
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
else
|
||||||
|
# For Ubuntu - use fallback detection
|
||||||
|
SUITE=$(get_fallback_suite "$DISTRO_ID" "$DISTRO_CODENAME" "https://repo.mysql.com/apt/${DISTRO_ID}")
|
||||||
|
fi
|
||||||
|
|
||||||
# Stop existing MySQL if running
|
# Stop existing MySQL if running
|
||||||
$STD systemctl stop mysql 2>/dev/null || true
|
$STD systemctl stop mysql 2>/dev/null || true
|
||||||
|
|
||||||
# Only purge if MySQL is actually installed
|
# Only purge if MySQL is actually installed
|
||||||
if dpkg -l | grep -q "^ii.*mysql-server"; then
|
if dpkg -l 2>/dev/null | grep -q "^ii.*mysql-server"; then
|
||||||
$STD apt purge -y mysql-server* mysql-client* mysql-common 2>/dev/null || true
|
$STD apt purge -y mysql-server* mysql-client* mysql-common 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user