File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -1202,7 +1202,19 @@ setup_mariadb() {
12021202 echo " mariadb-server-$ver mariadb-server/feedback boolean false" | debconf-set-selections
12031203 done
12041204 fi
1205- DEBIAN_FRONTEND=noninteractive $STD apt-get install -y mariadb-server mariadb-client
1205+ DEBIAN_FRONTEND=noninteractive $STD apt-get install -y mariadb-server mariadb-client || {
1206+ msg_warn " Failed to install MariaDB ${MARIADB_VERSION} from upstream repo – trying distro package as fallback..."
1207+ # Cleanup, remove upstream repo to avoid conflicts
1208+ rm -f /etc/apt/sources.list.d/mariadb.list /etc/apt/trusted.gpg.d/mariadb.gpg
1209+ $STD apt-get update
1210+ # Final fallback: distro package
1211+ DEBIAN_FRONTEND=noninteractive $STD apt-get install -y mariadb-server mariadb-client || {
1212+ msg_error " MariaDB installation failed even with distro fallback!"
1213+ return 1
1214+ }
1215+ msg_ok " Setup MariaDB (distro fallback)"
1216+ return 0
1217+ }
12061218
12071219 msg_ok " Setup MariaDB $MARIADB_VERSION "
12081220}
You can’t perform that action at this time.
0 commit comments