From e32501537d22dd3d402cfbd3edc346db1c46bac5 Mon Sep 17 00:00:00 2001 From: fatalerrors Date: Thu, 25 Sep 2025 20:42:59 +0200 Subject: [PATCH] fusion commit --- modules/upgrade_dist.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/upgrade_dist.sh b/modules/upgrade_dist.sh index 92f9528..81eb454 100644 --- a/modules/upgrade_dist.sh +++ b/modules/upgrade_dist.sh @@ -18,12 +18,14 @@ # TODO: This is Debian only, make this universal (at least yum/dnf compatible) # ------------------------------------------------------------------------------ -export VER_upgrade_dist="0.2.5" +export VER_upgrade_dist="0.3.0" # As aptitude might fail if clock is too far from real time, we need to depend # on ntp export DEP_upgrade_dist="conf_ntp" +export SOURCE_EXT="${SOURCE_EXT:-list}" + upgrade_dist() { local proxyfile=/etc/apt/apt.conf.d/00proxy @@ -67,7 +69,12 @@ upgrade_dist() fi # Remplace source.list from dist with ours (be smarter) - install_file "pkgman/${SYS_DIST}_${SYS_VER}.list" /etc/apt/sources.list + if [[ NO_MAIN_SOURCE==true ]]; then + install_file "pkgman/${SYS_DIST}_${SYS_VER}.list" "/etc/apt/sources.list.d/debian.${SOURCE_EXT}" + else + # We don't use SYS_EXT + install_file "pkgman/${SYS_DIST}_${SYS_VER}.list" "/etc/apt/sources.list" + fi prnt I "Updating package list..." pkgupdt @@ -96,6 +103,9 @@ precheck_upgrade_dist() die 160 fi file_must_exists pkgman/${SYS_DIST}_${SYS_VER}.list + if [[ -z $NO_MAIN_SOURCE ]]; then + prnt E "A required variable to configure apt is not defined." + fi } cron_upgrade_dist()