Bug#1036171: debian-installer: /etc/apt/sources.list isn't populated if mirror can't be reached during installation
Package: debian-installer
Version: 20230515
Severity: important
X-Debbugs-Cc: andrew@lists.savchenko.net
# PROBLEM DESCRIPTION
User is unable to perform `apt update` right after installation.
# STEPS TO REPRODUCE
1. Start Bookworm installation and connect to a network where device is
issued non-routed IP by the DHCP server.
2. Installer will get stuck trying to fetch up-to-date packages from the
mirror.
3. Press "Cancel" and proceed with the installation as usual.
Upon boot you will find that /etc/apt/sources.list contains only the
following line:
```
deb cdrom:[Debian GNU/Linux bookworm-DI-rc2 _Bookworm_ - Official RC amd64 DVD Binary-1 with firmware 20230428-12:34]/ bookworm main non-free-firmware
```
# EXPECTED BEHAVIOUR
source.list contains the default remote mirror:
```
deb https://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
```
-- System Information:
Debian Release: 12.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.1.0-7-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Reply to: