Source: autopkgtest Version: 3.9 Severity: minor Tags: patch Hi,
when vmdebootstrapping with "--package build-essential" I saw this: adt-run: DBG: testbed command ['which', 'dpkg-source'], kind short, sout pipe, serr pipe, env ['LANG=C.UTF-8'] adt-run: DBG: testbed command exited with code 0 adt-run: DBG: dpkg-source not available in testbed, installing dpkg-dev Note how the last two lines contradict each other. This is because the check for a 0 exit status is performed against the entire tuple returned by execute() instead of its the first element, where the exit status is actually to be found. Regards, Christian
>From d7c78dce6a28ec4dfdaa9899c9f1954c6318ec4e Mon Sep 17 00:00:00 2001 From: Christian Kastner <c...@kvr.at> Date: Sat, 10 Jan 2015 23:54:21 +0100 Subject: adt-run: result of execute() is a tuple, not a scalar The result of testbed.execute is a tuple (returncode, stdout, stderr), so a check for a 0 return code must look at the first element of that tuple. --- runner/adt-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runner/adt-run b/runner/adt-run index b8dea94..9172d3a 100755 --- a/runner/adt-run +++ b/runner/adt-run @@ -1561,7 +1561,7 @@ def build_source(kind, arg, built_binaries): testbed.install_deps([], False) if testbed.execute(['which', 'dpkg-source'], stdout=subprocess.PIPE, - stderr=subprocess.PIPE) != 0: + stderr=subprocess.PIPE)[0] != 0: adtlog.debug('dpkg-source not available in testbed, installing dpkg-dev') # Install dpkg-source for unpacking .dsc testbed.satisfy_dependencies_string('dpkg-dev', -- 2.1.4