#1111870 mmdebstrap-autopkgtest-build-qemu: --script chroots when it shouldn't

#1111870#5
Date:
2025-08-23 06:45:35 UTC
From:
To:
Dear Maintainer,

It seems that when passing the --script option to
mmdebstrap-autopkgtest-build-qemu, the script is uploaded to the unshare
and then executed in a chroot.

Whereas autopkgtest-build-qemu's --script option executes the script on
the host, passing in the chroot dir as the first and sole argument to
the script, and it is up to the script to do any chroots necessary.

I noticed this because my --scripts have a

  [ -n "\$1" ] || exit 1

at the top and they started erroring out.

I assume this is a bug because mmdebstrap-autopkgtest-build-qemu(1)
describes --script as being "called with the root filesystem of the
image as its first parameter", just like the original it models would.

I also noticed that autopkgtest's own setup-commands/setup-testbed
script is called correctly, that is on the host, not the schroot. So I
think the solution could be as simple as replacing the