tags 982371 +patch thanks On Tue, Feb 09, 2021 at 01:41:43PM +0000, Julian Gilbey wrote: > Package: autopkgtest > Version: 5.16 > Severity: normal > > I tried running autopkgtest on a package I'm working on, and got the > following messages: > > $ sudo autopkgtest > /home/jdg/debian/spyder-packages/pytest-tornasync/build-area/pytest-tornasync_0.6.0+git20190716.9f1bdee-1_amd64.changes > -- null > [...] > W: --force-yes is deprecated, use one of the options starting with --allow > instead. > Reading package lists... Done > [...] > > The rest proceeded fine, and I have no idea where the "--force-yes" > comes from.
Well, I should have looked a bit harder; it is in /usr/share/autopkgtest/lib/adt_binaries.py, line 121, in this command: rc = self.testbed.execute( ['apt-get', '--quiet', '-o', 'Debug::pkgProblemResolver=true', '-o', 'APT::Get::force-yes=true', '-o', 'APT::Get::Assume-Yes=true', '--reinstall', 'install'] + list(pkgs_reinstall), kind='install')[0] The apt-get(8) manpage says: --force-yes Force yes; this is a dangerous option that will cause apt to continue without prompting if it is doing something potentially harmful. It should not be used except in very special situations. Using force-yes can potentially destroy your system! Configuration Item: APT::Get::force-yes. This is deprecated and replaced by --allow-unauthenticated , --allow-downgrades , --allow-remove-essential , --allow-change-held-packages in 1.1. and the corresponding new options are: APT::Get::AllowUnauthenticated APT::Get::allow-downgrades APT::Get::allow-remove-essential APT::Get::allow-change-held-packages So changing the existing force-yes line to, for example: '-o', 'APT::Get::AllowUnauthenticated=true', '-o', 'APT::Get::allow-downgrades=true', '-o', 'APT::Get::allow-change-held-packages=true', should resolve this. I'm assuming that allow-remove-essential is not needed by autopkgtest, which only installs packages. Best wishes, Julian