Dear Johannes,

On Tue, Jun 07, 2016 at 10:12:54PM +0200, Johannes Schauer wrote:
> To be able to run autopkgtests, one needs to have a chroot configured,
> needs to know which backend to use and needs to know which
> distribution to use. The sbuild wiki just plainly assumes that the
> user is using schroot, has a chroot configured and is always building
> for unstable. But people using sbuild are neither only building for
> unstable, nor do they necessarily use the schroot backend and might
> thus not have a schroot-style chroot configured.
> 
> Now one could say that one could add a similar command line argument
> like --piuparts-opts for piuparts or --lintian-opts for lintian. But
> this then would mean that users that do not use the defaults (schroot
> and unstable) would have to pass these options all the time which gets
> us back to the original situation where users had to manually add a
> --post-build-command.
> 
> So is there an elegant way to solve this dilemma and execute adt-run
> with the right options with the least amount of user intervention per
> build?

So the problem is to come up with a sensible default set of options to
pass to adt-run that will Just Work?  This should work without any
schroot:

    adt-run --changes foo.changes --- null

Someone who *does* have a schroot will want to override this default to
use their schroot: in my experience, the null test is useful but it
doesn't catch some failures such as missing test dependencies.

So we also need --adt-run-opts.  The user will want to use %a in this,
and ideally a percent escape sequence representing the
suite/distribution -- this would also be useful in $piuparts_opts but I
don't believe it is currently supported.

If we assume that sbuild implicitly passes the changes file to adt-run
as it currently does with lintian and piuparts, I could have

    $adt_run_opts = [ '---', 'schroot', '%D-%a-sbuild'];

where %D is my imagined escape sequence giving the distribution.  If I
need to do a build for a distribution that I don't have a schroot
prepared for, I could use `--no-run-adt-run --no-run-piuparts` to
disable those steps.

Does this address your concerns?

-- 
Sean Whitton

Attachment: signature.asc
Description: PGP signature

Reply via email to