#1108312 debconf-apt-progress fails in d-i when libtext-iconv-perl is not installed

Package:
debconf
Source:
debconf
Submitter:
Jarl Gullberg
Date:
2025-06-25 19:11:02 UTC
Severity:
normal
Tags:
#1108312#5
Date:
2025-06-25 19:08:55 UTC
From:
To:
Dear Maintainer,

I recently ran into an issue with installing a Debian 13 system using the "minbase"
variant of debootstrap, which only includes the absolute core packages necessary.

During the "Installing base system" step of d-i, installation eventually fails when
busybox is installed. I checked the logs, and it appears that the issue lies with
an inability to load the libtext-iconv-perl package.

https://gist.github.com/Nihlus/37a53d8d62d1c0a8884b72cd84cde477

I dug into the code behind this and narrowed it down to a call from d-i to
debconf-apt-progress in /bin/apt-install, which executes

    ERRCODE=0
    in-target sh -c "debconf-apt-progress --no-progress --logstderr -- \
            apt-get $apt_opts install $packages" || ERRCODE=$?

This returns an error code of 255, which promptly fails the whole installation.

Normally, Debian installations do not use minbase, which means that debconf-i18n
will be installed (as it is Priority: important). This brings in libtext-iconv-perl
as a transitive dependency.

However, if a minbase installation is attempted, only Priority: essential packages and
apt are installed. None of these carry a dependency on libtext-iconv-perl, and we
hit whatever is causing this error to bubble up to d-i.

The easiest way to reproduce this is by preseeding the Debian installer with the
following value:

    d-i base-installer/debootstrap_variant string minbase

This will force d-i to use the minbase variant, and installation will fail during
the initial system bootstrapping.

The issue can be worked around by including libtext-iconv-perl as an explicit
additional package (also with preseeding).

    d-i base-installer/includes string libtext-iconv-perl