apt-setup: yet another adjustment to fix missing updates.

This commit is contained in:
Ark74 2025-08-25 17:23:59 -06:00
parent 1f503fb465
commit 25926c10cb
3 changed files with 25 additions and 9 deletions

View file

@ -77,8 +77,6 @@ fi
: "${ROOT:=/target}"
SD="$ROOT/etc/apt/sources.list.d"
SF="$SD/trisquel.sources"
LEGACY="$ROOT/etc/apt/sources.list"
MSG="# Trisquel sources have moved to /etc/apt/sources.list.d/trisquel.sources"
mkdir -p "$SD"
# Use keyring in /usr/share/keyrings
@ -113,15 +111,12 @@ Components: main
Signed-By: ${SIGNED_BY}
EOF
# Set legacy format for apt-setup to apply updates correctly.
{
echo "deb ${uri} ${codename} main"
echo "deb ${uri} ${codename}-updates main"
echo "deb ${uri} ${codename}-security main"
} >> "$file"
# Keep the legacy file and the pipeline temp file as a single breadcrumb line
printf '%s\n' "$MSG" > "$LEGACY"
printf '%s\n' "$MSG" >> "$file"
exit 0

View file

@ -0,0 +1,17 @@
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
file="$1"
ROOT="${ROOT:-/target}"
LEGACY="$ROOT/etc/apt/sources.list"
SD="$ROOT/etc/apt/sources.list.d"
# 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"
printf '%s\n' "$MSG" > "$LEGACY"
printf '%s\n' "$MSG" > "$file"
fi
exit 0

View file

@ -18,7 +18,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
VERSION=4.4
VERSION=4.5
EXTERNAL='deb-src http://ftp.debian.org/debian trixie main'
REPOKEY=78DBA3BC47EF2265
NETINST=true
@ -80,10 +80,14 @@ rm generators/9[1-9]* generators/50mirror
find generators -name 50mirror.ubuntu | xargs -r rm
sed -i '/generators\/9[1-9]*/d' debian/apt-setup-udeb.install
echo "generators/50mirror.trisquel usr/lib/apt-setup/generators
release-files/archive.trisquel.org usr/share/apt-setup/release-files" > debian/apt-mirror-setup.install
cat << EOF > debian/apt-mirror-setup.install
generators/50mirror.trisquel usr/lib/apt-setup/generators
generators/99deb822-breadcrumb usr/lib/apt-setup/generators
release-files/archive.trisquel.org usr/share/apt-setup/release-files
EOF
cp $DATA/50mirror.trisquel generators/
cp $DATA/99deb822-breadcrumb generators/
#sed '/The partner/,/^*/d; s/services-select-ubuntu/services-select-trisquel/' -i debian/apt-setup-udeb.templates
sed 's/services-select/services-select-trisquel/' -i debian/apt-setup-udeb.templates