From 3199178c7043cb13ed6466b7a785b1e876ea5800 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Tue, 4 Mar 2025 10:22:19 +0100 Subject: [PATCH] Multiple sources fix: after changing to deb822 we forgot on leftovers - deboostrap still uses old ways and we need to remove this file - when displaying the content of sources, we need to look correct file --- lib/functions/rootfs/create-cache.sh | 2 +- lib/functions/rootfs/distro-specific.sh | 3 +++ lib/functions/rootfs/rootfs-create.sh | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/functions/rootfs/create-cache.sh b/lib/functions/rootfs/create-cache.sh index 608d40894..3b8dbbaf7 100644 --- a/lib/functions/rootfs/create-cache.sh +++ b/lib/functions/rootfs/create-cache.sh @@ -132,4 +132,4 @@ function extract_rootfs_artifact() { } # This comment strategically introduced to force a rebuild of all rootfs, as this file's contents are hashed into all rootfs versions. -# Just a number to force rebuild 003 +# Just a number to force rebuild 004 diff --git a/lib/functions/rootfs/distro-specific.sh b/lib/functions/rootfs/distro-specific.sh index 5f7358b8d..f9c54b06f 100644 --- a/lib/functions/rootfs/distro-specific.sh +++ b/lib/functions/rootfs/distro-specific.sh @@ -80,6 +80,9 @@ function create_sources_list_and_deploy_repo_key() { declare distro="" + # Drop deboostrap sources leftovers + rm -f "${basedir}/etc/apt/sources.list" + # Add upstream (Debian/Ubuntu) APT repository case $release in buster | bullseye | bookworm | trixie) diff --git a/lib/functions/rootfs/rootfs-create.sh b/lib/functions/rootfs/rootfs-create.sh index d09c5263a..217f61285 100644 --- a/lib/functions/rootfs/rootfs-create.sh +++ b/lib/functions/rootfs/rootfs-create.sh @@ -177,7 +177,7 @@ function create_new_rootfs_cache_via_debootstrap() { # @TODO: use asset logging for this; actually log contents of the files too run_host_command_logged ls -l "${SDCARD}/usr/share/keyrings" run_host_command_logged ls -l "${SDCARD}/etc/apt/sources.list.d" - run_host_command_logged cat "${SDCARD}/etc/apt/sources.list" + run_host_command_logged cat "${SDCARD}/etc/apt/sources.list.d/${DISTRIBUTION,,}.sources" # stage: update packages list display_alert "Updating package list" "$RELEASE" "info"