ubiquity: setup slim deb822 migration.

This commit is contained in:
Ark74 2025-08-26 16:37:28 -06:00
parent 923cea5d74
commit f9689bfb1c
3 changed files with 7 additions and 10 deletions

View file

@ -71,7 +71,7 @@ Signed-By: ${SIGNED_BY}
EOF EOF
# Keep the legacy file and the pipeline temp file as a single breadcrumb line # Keep the legacy file and the pipeline temp file as a single breadcrumb line
: > "$SAVETO" printf '%s\n' "$MSG" > "$SAVETO"
printf '%s\n' "$MSG" > "$file" : > "$file"
exit 0 exit 0

View file

@ -2,20 +2,17 @@ diff --git a/d-i/source/apt-setup/generators/01setup b/d-i/source/apt-setup/gene
index b4b0ea40..c4933286 100755 index b4b0ea40..c4933286 100755
--- a/d-i/source/apt-setup/generators/01setup --- a/d-i/source/apt-setup/generators/01setup
+++ b/d-i/source/apt-setup/generators/01setup +++ b/d-i/source/apt-setup/generators/01setup
@@ -5,6 +5,25 @@ set -e @@ -5,6 +5,22 @@ set -e
file="$1" file="$1"
+# Ensure ROOT default; allow override +# Ensure ROOT default; allow override
+: "${ROOT:=/target}" +: "${ROOT:=/target}"
+ +
+# If Deb822 sources already exist in the target, keep legacy minimal and clean. +# If Deb822 sources already exist in the target, don't emit anything, let 99trisquel to take over.
+if [ -d "$ROOT/etc/apt/sources.list.d" ] && ls "$ROOT/etc/apt/sources.list.d/"*.sources >/dev/null 2>&1; then +if [ -d "$ROOT/etc/apt/sources.list.d" ] && ls "$ROOT/etc/apt/sources.list.d/"*.sources >/dev/null 2>&1; then
+ msg="# Trisquel sources have moved to /etc/apt/sources.list.d/trisquel.sources" + : > "$file"
+ # Temp file consumed by the generators pipeline (must exist, but keep it clean) + exit 0
+ printf '%s\n' "$msg" > "$file"
+ # Ensure the target legacy file exists and contains only the breadcrumb
+ printf '%s\n' "$msg" > "$ROOT/etc/apt/sources.list"
+else +else
+ # Fallback: add old file as comments (tolerant if missing) + # Fallback: add old file as comments (tolerant if missing)
+ if [ -r "$ROOT/etc/apt/sources.list" ]; then + if [ -r "$ROOT/etc/apt/sources.list" ]; then

View file

@ -19,7 +19,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# #
VERSION=43.1 VERSION=44
. ./config . ./config