[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#899386: Needs some documentation....



On Wed, 23 May 2018 21:55:47 +0200
Paul Gevers <elbrus@debian.org> wrote:

> Hi Neil
> 
> On 23-05-18 21:45, Neil Williams wrote:
> > tag 899386 - moreinfo
> > severity 899386 minor
> > thanks
> > 
> > Ah, ok, now I understand how the @ is relevant to this issue.
> > 
> > I've now got the tests passing. Would it be possible to add
> > something to the manpage or the README files please?   
> paul@testavoira ~ $ zcat
> /usr/share/doc/autopkgtest/README.package-tests.rst.gz | grep -e
> "^Depends: " -A25

> Depends: dpkg dependency field syntax
>     Declares that the specified packages must be installed for the
> test to go ahead. This supports all features of dpkg dependencies (see
>     https://www.debian.org/doc/debian-policy/ch-relationships.html),
>     plus the following extensions:
> 
>     ``@`` stands for the package(s) generated by the source package
>     containing the tests; each dependency (strictly, or-clause, which

What I did *not* expect here was that @ would base this on the
debian/control listings, not the actual files passed in the .changes
file.

This part could be improved:

>     ``@`` stands for the package(s) generated by the source package
>     containing the tests; each dependency (strictly, or-clause, which

``@`` stands for all the binary package(s) listed by the debian/control
file of the source package containing the tests; each dependency
(strictly, or-clause, which ....

In particular, this part of the manpage is missing an important element:

       .changes file
              Run  tests  from  the .dsc source package in the given .changes file.
	      If the .changes contains .deb packages, they will be used for the test.
	      Acts as if you had specified the .debs and .dsc from the .changes file
	      as explicit arguments. Note that if the .changes contains only debs, the
	      corresponding .dsc still needs to  be  specified  along‐
              side, or the current directory must be the source package.

... except that autopkgtest doesn't quite do that - if a file is not
included in the .changes file (e.g. by changing how the package is
built, to exclude Arch: all etc) then autopkgtest ignores the fact that
the .deb is not listed in the .changes file and considers that package
in it's dependency listing *if* the test control file uses '@'.

Please update the manpage .changes section that the use of the @
shortcut in the debian/tests/control file will override the list
of .deb packages from the .changes file.

Maybe also a note in /usr/share/doc/autopkgtest/README.package-tests.*
in the Depends section, along the lines of:

@ is a shortcut for simple packages and might not be useful for large
multi-binary sources. Instead, specify explicitly which packages a test
needs, and consider using alternative tests to test packages in
different environments.

>     may contain ``|``\ s but not commas) containing ``@`` is
> replicated once for each such binary package, with the binary package
> name substituted for each ``@`` (but normally ``@`` should occur only
>     once and without a version restriction).
> 
>     ``@builddeps@`` will be replaced by the package's
>     ``Build-Depends:``, ``Build-Depends-Indep:``, and
>     ``build-essential``. This is useful if you have many build
>     dependencies which are only necessary for running the test suite
> and you don't want to replicate them in the test ``Depends:``.
> However, please use this sparingly, as this can easily lead to
> missing binary package dependencies being overlooked if they get
> pulled in via build dependencies.
> 
>     If no Depends field is present, ``Depends: @`` is assumed. Note
> that the source tree's Build-Dependencies are *not* necessarily
>     installed, and if you specify any Depends, no binary packages from
>     the source are installed unless explicitly requested.
> 
> Anything missing from there?

The link between Depends: @ and the override of what .debs are actually
listed in the .changes file.

Thanks.

-- 

Neil Williams
home@codehelp.co.uk

Attachment: pgp3qf6_0NhF7.pgp
Description: OpenPGP digital signature


Reply to: