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

-----BEGIN PGP SIGNED MESSAGE-----
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
/etc/{protocols,rpc,services}.

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
unconditionally.  

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

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEhBcVftvnPZ6sHlObEm61Y6dLBr8FAliHr7kACgkQEm61Y6dL
Br9yew/+NRKoZ1e5B3z2I0MRdo2qiNOF76zaP6WDAAoFeLyQaplFshvIMmKTzvKt
cERFGnijEKWfeCPOP3wyLbotqVXHYqqJmiqDDmx7jFUJEUFYO9UIPqymUz6LGU4S
//Ya1GSYucOCw/VQQfHt1hAlsnyAxWfv2e87xfgFIDhxQihoQu7VZqA8dvGIkvRt
nbXiAPf4a2s9/MRjLctEAfwwyw3HbGSzytaDyCgiZH+r562tqccClfe7VhMfGn3j
QQvzumjELwcXPQbijZAiNeMHN4JEWQzzXwbRwndlq51F+tsCzrjPrm5bcUnILiVL
jA7mrZGMAHanOPl6F4ZC5Idfby7h6gXRqZ5Nc2o/+rUU+TX6iBb/TEtT64ejiy9O
G5PxrQGuL2WxEk8ObcVi6E5PW/L9hmx/T/kLm3oVdOEFEmxhPS95uNlu7aKnOg9N
6X4BeDej7UNwRVjG45lgKw1xW0xfZ5rLBvdQtQqsXkECZDgquW298eBM1D4JuPbc
I5bZyj4w7pNkWIrBglkeX6rxy3YzH+k/21Fx/pYAtG4PRfk09p7k+YOePATRrclf
FBOnf9+KzgfDiCTqgXB1HN/nxbpcTBirg0d4CCrdpW4wcru5VEpnEe9GRxJbY/X3
pZPKAoKkE4jTYgXICqaheEHjAtsh3k0rFNuYmLL9dUHnVi9zGI8=
=rNub
-----END PGP SIGNATURE-----



More information about the autopkgtest-devel mailing list