[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1029922: apt-setup: remove duplicate, commented-out cdrom entries



Package: apt-setup
Severity: normal

After a regular installation from netinst, sources.list usually looks
like this:

    # deb cdrom:[Debian GNU/Linux 12.0.0 _Sid_ - Unofficial amd64 NETINST with firmware 20230128-23:05]/ sid local main non-free non-free-firmware
    
    #deb cdrom:[Debian GNU/Linux 12.0.0 _Sid_ - Unofficial amd64 NETINST with firmware 20230128-23:05]/ sid local main non-free non-free-firmware
    
    deb http://deb.debian.org/debian/ sid main non-free-firmware
    deb-src http://deb.debian.org/debian/ sid main non-free-firmware
    
    # This system was installed using small removable media
    # (e.g. netinst, live or single CD). The matching "deb cdrom"
    # entries were disabled at the end of the installation process.
    # For information about how to configure apt package sources,
    # see the sources.list(5) manual.

It feels weird to have the commented out cdrom: entries twice, and I'm
tempted to remove one of those.

The first one comes from apt-setup's generators/01setup which retains
existing entries in sources.list, but commented out. The relevant code
has been around since forever (it was already present before the split
from svn), but I don't understand what purpose it serves, and I'm
inclined to just remove this. If the previous entries are useful, the
existing file can be saved elsewhere.

    # add old file as comments
    sed 's/^/# /' < $ROOT/etc/apt/sources.list | sed 's/^# # */# /' > $file


The second one is due to the finish-install hook that disables cdrom
entries in certain conditions, which also adds the informative text
at the bottom. That can be kept as is.


Cheers,
-- 
Cyril Brulebois (kibi@debian.org)            <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant


Reply to: