Bug#852475: autopkgtest: apt-get install needs automatic conffile handling

Barry Warsaw barry at debian.org
Tue Jan 24 19:49:15 UTC 2017

Package: autopkgtest
Version: 4.3
Severity: normal

Hash: SHA256

Dear Maintainer,

Let's say one of your autopkgtest dependencies (perhaps recursively)
needs to update a configuration file, i.e. via a conffile.  E.g. when
running the autopkgtests for aptdaemon in an Ubuntu Zesty chroot, the
netbase package wants to be installed, and this has conffiles for

This can break the tests when dpkg needs to query about updating these
conffiles because the default is to --force-confdef, which prompts the
user and waits for a response.  This fails in the following way:

Setting up netbase (5.4) ...

Configuration file '/etc/protocols'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
    D       : show the differences between the versions
    Z       : start a shell to examine the situation
 The default action is to keep your current version.
*** protocols (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package netbase (--configure):
 end of file on stdin at conffile prompt
Thus the test dependencies can't be installed and the entire
autopkgtest fails.

It would be better I think when setting up the testbed, to pass to the 
`apt-get install` command an additional option: 
- -o Dpkg::Options::="--force-confnew" so that the prompt is bypassed
and the dependency can be installed.

I can't think of a reason why you'd want to retain the old conffile,
since the testbed is (usually? always?) ephemeral.  If you can think
of a use case for that, then an autopkgtest option would probably be
required.  I'd opt for YAGNI and just include that dpkg option

Seems like it should be a relatively easy fix in adt_testbed.py; I'll
try to put together a branch and test it.

- -- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages autopkgtest depends on:
ii  apt-utils       1.4~beta4
ii  libdpkg-perl    1.18.18
ii  procps          2:3.3.12-3
ii  python3         3.5.3-1
ii  python3-debian  0.1.29

Versions of packages autopkgtest recommends:
ii  autodep8  0.8

Versions of packages autopkgtest suggests:
pn  lxc          <none>
pn  lxd-client   <none>
pn  qemu-system  <none>
pn  qemu-utils   <none>
ii  schroot      1.6.10-3

- -- no debconf information



More information about the autopkgtest-devel mailing list