#982371 autopkgdest: warns that --force-yes is deprecated

#982371#5
Date:
2021-02-09 13:41:43 UTC
From:
To:
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
autopkgtest [13:33:14]: starting date: 2021-02-09
autopkgtest [13:33:14]: version 5.16
autopkgtest [13:33:14]: host euler; command line: /usr/bin/autopkgtest /home/jdg/debian/spyder-packages/pytest-tornasync/build-area/pytest-tornasync_0.6.0+git20190716.9f1bdee-1_amd64.changes -- null
autopkgtest [13:33:14]: testbed dpkg architecture: amd64
autopkgtest [13:33:14]: testbed running kernel: Linux 5.10.0-3-amd64 #1 SMP Debian 5.10.12-1 (2021-01-30)
autopkgtest [13:33:14]: @@@@@@@@@@@@@@@@@@@@ source /home/jdg/debian/spyder-packages/pytest-tornasync/build-area/pytest-tornasync_0.6.0+git20190716.9f1bdee-1.dsc
dpkg-source: warning: extracting unsigned source package (/tmp/autopkgtest.jdEbbc/pytest-tornasync_0.6.0+git20190716.9f1bdee-1.dsc)
dpkg-source: info: extracting pytest-tornasync in src
dpkg-source: info: unpacking pytest-tornasync_0.6.0+git20190716.9f1bdee.orig.tar.gz
dpkg-source: info: unpacking pytest-tornasync_0.6.0+git20190716.9f1bdee-1.debian.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying 01_dont_install_license.patch
autopkgtest [13:33:15]: testing package pytest-tornasync version 0.6.0+git20190716.9f1bdee-1
autopkgtest [13:33:15]: build not needed
autopkgtest [13:33:15]: test command1: preparing testbed
Get:1 file:/tmp/autopkgtest.jdEbbc/binaries  InRelease
Ign:1 file:/tmp/autopkgtest.jdEbbc/binaries  InRelease
Get:2 file:/tmp/autopkgtest.jdEbbc/binaries  Release [816 B]
Get:2 file:/tmp/autopkgtest.jdEbbc/binaries  Release [816 B]
Get:3 file:/tmp/autopkgtest.jdEbbc/binaries  Release.gpg
Ign:3 file:/tmp/autopkgtest.jdEbbc/binaries  Release.gpg
Get:4 file:/tmp/autopkgtest.jdEbbc/binaries  Packages [1,120 B]
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/6,636 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 file:/tmp/autopkgtest.jdEbbc/binaries  python3-tornasync 0.6.0+git20190716.9f1bdee-1 [6,636 B]
[master b2614a4] saving uncommitted changes in /etc prior to apt run
 Author: Julian Gilbey <julian-git@d-and-j.net>
 3 files changed, 6 insertions(+)
 create mode 100644 apt/preferences.d/90autopkgtest
 create mode 100644 apt/sources.list.d/autopkgtest.list
(Reading database ... 1133458 files and directories currently installed.)
Preparing to unpack ..././python3-tornasync.deb ...
Unpacking python3-tornasync (0.6.0+git20190716.9f1bdee-1) over (0.6.0+git20190716.9f1bdee-1) ...
Setting up python3-tornasync (0.6.0+git20190716.9f1bdee-1) ...
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.

Best wishes,

   Julian

#982371#10
Date:
2021-11-29 09:06:52 UTC
From:
To:
tags 982371 +patch
thanks

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:

#982371#17
Date:
2024-06-06 11:50:47 UTC
From:
To:
[...]

We still support testbeds with apt (<< 1.1~exp1), so we'll have to live
with the deprecation warning for now (it is not worth duplicating the
code path to get rid of the warning IMHO).