apt-setup: rollback and actually run the right script

This commit is contained in:
Luis Guzmán 2025-08-27 15:05:42 -06:00
parent c3aeccf573
commit c6b9260780
2 changed files with 15 additions and 4 deletions

View file

@ -1,7 +1,18 @@
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
LEGACY="/target/etc/apt/sources.list"
MSG="# Trisquel sources have moved to /etc/apt/sources.list.d/trisquel.sources"
file="$1"
ROOT="${ROOT:-/target}"
LEGACY="$ROOT/etc/apt/sources.list"
SD="$ROOT/etc/apt/sources.list.d"
SAVETO="$ROOT/etc/apt/sources.list.new"
printf '%s\n' "$MSG" > "$LEGACY"
# If .sources exist, leave sources.list reduced only as a breadcrumb
if ls "$SD"/*.sources >/dev/null 2>&1; then
MSG="# Trisquel sources have moved to /etc/apt/sources.list.d/trisquel.sources"
: > "$SAVETO"
printf '%s\n' "$MSG" > "$file" # lo que verify appenderá
fi
exit 0

View file

@ -18,7 +18,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
VERSION=4.9
VERSION=4.9.1
EXTERNAL='deb-src http://ftp.debian.org/debian trixie main'
REPOKEY=78DBA3BC47EF2265
NETINST=true