Control: tag -1 - d-i Hi, Guilhem Moulin <guilhem@guilhem.org> (2016-01-17): > Package: base-installer > Version: 1.160 > Severity: normal > Tags: d-i No need to set this tag for packages maintained by debian-boot. ;) [ Only skimming over the bug report for now, lacking time to double check everything and commit/test a fix… sorry about that. ] > Hi there, > > The following snippet can be found in library.sh: > > # Assumes the file protocol is only used for CD (image) installs > configure_apt () { > if [ "$PROTOCOL" = file ]; then > […] > if ! log-output -t base-installer \ > chroot /target apt-cdrom add </dev/null; then > error "error while running apt-cdrom" > fi > else > # sources.list uses space to separate the components, not comma > COMPONENTS=$(echo $COMPONENTS | tr , " ") > APTSOURCE="$PROTOCOL://$MIRROR$DIRECTORY" > > echo "deb $APTSOURCE $DISTRIBUTION $COMPONENTS" > $APT_SOURCES > fi > > Is there reason for making such an assumption? I didn't check whether > $PROTOCOL was used by other packages, but even if the value can't be > changed to say, “cdrom”, please at least ensure that it was set to > “file” because a CDROM was detected; for instance by replacing the test > with > > if [ "$PROTOCOL" = file ] && [ -f /cdrom/.disk/base_installable ]; then > > (which the test performed by get_mirror_info to set PROTOCOL in the > first place). Nothing obvious to me looking at git log. One would have to dig earlier than when fuctions were introduced in base-installer since this assumption was already there to begin with. The kind of change you're proposing seems rather reasonable to me at first glance. > It might sound weird to use a file:// mirror URI. But in my case it's > very convenient when setting up minimal networkless VMs to use in a test > suite (with a shared partial mirror in a directory exposed to the > guests). base-installer currently calls apt-cdrom(8) on that directory, > which is needlessly slow and sometimes even confusing when a popup asks > me to insert the disk (probably due to a race condition). Having file:// as mirror URI looks like a reasonable/valid use case to me, we should fix support for it. Mraw, KiBi.
Attachment:
signature.asc
Description: Digital signature