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

Bug#537969: lintian: [checks/patch-systems] Add test for README.source

Jonathan Yu <frequency@cpan.org> writes:

> This is actually just a partial patch. I can add the tests, but I don't
> know where tags are defined. Basically, this test ensures that if you
> are using a patch system, you provide instructions on how to use it (via
> README.source), per Standards-Version > 3.8.0.

Thank you for this!

> +        #----- look for README.source
> +        if ($uses_patch_system && ! -f debian/README.source) {
> +                tag "patch-system-but-no-source-readme";
> +        }
> +        if (!$uses_patch_system && -f debian/README.source) {
> +                tag "source-readme-but-no-patch-system";
> +        }

The second part of this isn't correct, since debian/README.source may be
needed even if we didn't detect a patch system.  There may be something
more obscure in use, or the maintainer may have something else that they
need to explain to anyone modifying the package.

The first part looks good (although you also needed quotes around the file

> The problem is that I don't know where tags are defined.

In the *.desc files next to the checks scripts.

> Also, in order for the patch to really be useful, it needs to be able to
> detect what Standards-Version the package is under, since it's only
> relevant for Standards-Version > 3.8.0.

No, all Debian packages are required to comply with the current version of
Policy regardless of which version that they declare they're compatible
with.  The only purpose of the Standards-Version field in debian/control
is to record which version of Policy the package was last checked against.

> I tried to grep on my git repository for the tag list, but can't find
> it. Here is some recommended text for those tags:
> patch-system-but-no-source-readme
> Certainty: certain
> N:    It looks like a patch system is in use, however there is no
> N:    debian/README.source. This file is required by Debian Policy 3.8.0.

I modified this a bit to add the Ref tag for the specific section of
Policy and to include references to the quilt and dpatch README.source
files, which a lot of packages can just reference.

Thank you!

Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>

Reply to: