Package: autopkgtest
Version: 5.49
Severity: normal
X-Debbugs-Cc: deb...@rocketjump.eu

Hi,

yesterday I spent an afternoon debugging a failing CI tests on ansible-core, and
noticed that it is caused by this setting in
/etc/apt/preferences.d/90autopkgtest:

Package: *
Pin: origin ""
Pin-Priority: 1002

The ansible CI test in question creates a local apt repository with several
package versions, and then tests installation/upgrade paths using the ansible
apt module (which internally uses python3-apt). When this pinning is set, the
local apt repo is affected by the pin, and every versioned installation will
fail with e.g. "Task failed: Module failed: no available installation candidate
for foo=1.0.0". The reproducer is described here:
https://github.com/ansible/ansible/issues/85147

My workaround is to delete the file before running the tests.

While I believe it's a bug in python3-apt or ansible-core, I think we should be
more cautious about setting the pin priority, as this might also affect other
software doing similar tests. AFAICS this pinning shouldn't be needed, as the
package being tested should always have a higher version number than the one in
the apt archive.

So my questions are: Is this really needed? And if yes, could we instead do a
narrower apt pinning at runtime to the specific packages in question?

Greets,
Lee

-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.25-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages autopkgtest depends on:
ii  apt-utils            3.0.1
ii  libdpkg-perl         1.22.18
ii  mawk                 1.3.4.20250131-1
ii  procps               2:4.0.4-8
ii  python3              3.13.3-1
ii  python3-debian       1.0.1
ii  python3-distro-info  1.13
ii  retry                1.0.5-3

Versions of packages autopkgtest recommends:
ii  autodep8  0.29
ii  fakeroot  1.37.1.1-1

Versions of packages autopkgtest suggests:
pn  docker-cli | docker.io  <none>
pn  docker.io               <none>
ii  fakemachine             0.0.11-1+b1
ii  genisoimage             9:1.1.11-4
pn  incus                   <none>
pn  lxc                     <none>
pn  lxd                     <none>
ii  mmdebstrap              1.5.7-1
ii  ovmf                    2025.02-6
pn  ovmf-ia32               <none>
pn  podman                  <none>
ii  qemu-efi-aarch64        2025.02-6
ii  qemu-efi-arm            2025.02-6
pn  qemu-efi-riscv64        <none>
ii  qemu-system             1:10.0.0+ds-1
ii  qemu-utils              1:10.0.0+ds-1
ii  schroot                 1.6.13-6
ii  uidmap                  1:4.17.4-2
ii  util-linux              2.41-4
ii  vmdb2                   0.40-2
ii  zerofree                1.1.1-1+b1

-- no debconf information

Reply via email to