[buildd-tools-devel] Bug#833436: sbuild: adt backend was complete broken by autopkgtest 4 release

Martin Pitt mpitt at debian.org
Fri Aug 12 06:48:48 UTC 2016


Hello Johannes,

Johannes Schauer [2016-08-04 14:05 +0200]:
> the autopkgtest 4.0.2 release broke the adt-virt-* interface that
> autopkgtest used to provide before this release.

Sorry about that! I committed
https://anonscm.debian.org/cgit/autopkgtest/autopkgtest.git/commit/?id=00d46b4ad
to put backwards compat symlinks into /usr/bin for the time being. I
will upload that RSN (still need to investigate/fix the recently
reported RC bug).

As discussed in https://bugs.debian.org/833407 these are only
backwards compat shims, though. I would appreciate if sbuild could
move from /usr/bin/adt-virt-XXX to /usr/share/autopkgtest/virt/XXX.

As pointed out in that bug, I don't actually recommend using the virt
runners directly, as the encoding, timeout handling etc. are
non-trivial to reimplement. For projects that use Python, using the
adt_testbed.py module directly is a lot simpler and more robust:

| $ python3
| >>> import sys
| >>> sys.path.append('/usr/share/autopkgtest/lib')
| >>> import adt_testbed
| >>> tb = adt_testbed.Testbed(['/usr/share/autopkgtest/virt/schroot', 'sid'], '/tmp/outdir', None)
| >>> tb.start()
|  [19:38:29]: version 4.0+git1
|  [19:38:29]: host donald; command line: ''
| >>> tb.open()
|  [19:41:40]: testbed dpkg architecture: amd64
|  [19:41:40]: testbed running kernel: Linux 4.4.0-25-generic #44-Ubuntu SMP Fri Jun 10 18:19:48 UTC 2016
| >>> tb.exec_cmd
| ['schroot', '--run-session', '--quiet', '--directory=/', '--chroot', 'sid-amd64-73a61cc9-fb04-4a44-8dd6-2a467d096f61', '--user=root', '--']
| >>> tb.execute(['cat', '/etc/os-release'])
| PRETTY_NAME="Debian GNU/Linux stretch/sid"
| NAME="Debian GNU/Linux"
| ID=debian
| HOME_URL="https://www.debian.org/"
| SUPPORT_URL="https://www.debian.org/support"
| BUG_REPORT_URL="https://bugs.debian.org/"
| (0, None, None)
| >>> tb.stop()

(Check the execute() docstring for more details, in particular the
"kind=" attribute for setting the timeout.)

Thanks,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)



More information about the Buildd-tools-devel mailing list