Robie Basak writes ("Re: [Bug 1175557] Re: adt-run fulfills dependencies with 
--built-tree      contrary to the manpage"):
> On Tue, Jan 28, 2014 at 04:22:06PM -0000, Ian Jackson wrote:
> > Do you want me to try to explain how I think they're supposed to
> > work ?
> 
> Please! I said this to pitti on IRC earlier:
> 
> 11:10 <rbasak> pitti: incidentally, I find the manpage very confusing
> and ambiguous whenever I'm trying to understand what the different
> --built-tree, --unbuilt-tree, --source and --binary options will
> actually do in terms of build or no build, where the build dependencies
> will come from, and what test dependencies will be fulfilled and where
> they will come from.

So:

--unbuilt-tree and --dsc do the same thing: they, by default:
  * build the tree
  * use the binaries produced to satisfy any build-dependencies for
    sources further on the command line
  * use the binaries produced to satisfy any dependencies for tests
    further on the command line
  * run any applicable tests in that source package

It is possible to individually control these uses to which the tree is
put, though:

If --no-built-binaries, or --built-binaries-filter, or --binaries (or
--binaries-forbuilds or --binaries-fortests) is specified, then the
binaries aren't used for some of those purposes.

If --sources-no-tests is used, that source package's tests are not
run.

The relevant --*binaries* options are all the ones which precede a
particular --unbuilt-tree or --dsc, with later options of the same
kind overriding earlier ones.

I think, but am not sure, that there is an optimisation: if you
specify that the binaries from the source should not be used, and the
package's tests don't require the built source tree, then perhaps
adt-run won't build the source at all - since nothing needs it (and
you presumably weren't using adt-run for an archive rebuild test).

--binary specifies just a binary package to be used for tests which
appear subsequently on the adt-run command line.  It will be used (by
default) to satisfy dependencies.  --binary is subject to the effects
of preceding --binaries= and --binaries-forbuilds= and
--binaries-fortests= options.  So if you say
   --binaries=install --binary foo.deb --binaries=auto [more stuff]
then foo.deb will be unconditionally installed while the
tests specified by [more stuff] take place.

--built-tree specifies some tests to be run, but does not provide any
binaries.


Another way to look at it is for me to explain the implementation of
the option/argument processor:

 * --built-binaries-filter sets a set of patterns.  The set of
   patterns is applied to subsequent --unbuilt-tree and --source
   options.  Any packages produced by the build matching the filter
   are treated as if they had been specified explicitly with --binary
   at the same place in the command line as the source package dide.

 * --binaries[-forbuilds|-fortests]=ignore|auto|install: There are two
   tristate variables, one for --binaries-forbuilds and one for
   --binaries-fortests.  Saying just --binaries= sets both.
   --binaries-forbuilds applies when we are doing builds, and
   --binaries-fortests when we are doing tests.  The tristates apply
   to all subsequently encountered binary packages (i.e. .debs on the
   command line, and binaries (except those filtered out) produced by
   sources on the command line.

This is mostly done with the variable "arghandling" in parse_args.
Every time it is modified, it is copied.  Every time an actual action
argument is supplied, the current arghandling is saved away.


Does that help ?  Catch me on irc if you have more questions (Diziet
on oftc/freenode.)

Ian.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1175557

Title:
  adt-run fulfills dependencies with --built-tree contrary to the
  manpage

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autopkgtest/+bug/1175557/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to