Lintian checking ARB packages

Bhavani Shankar R bhavi at ubuntu.com
Mon Jan 7 07:38:29 UTC 2013


On Thu, Dec 27, 2012 at 4:05 PM, Niels Thykier <niels at thykier.net> wrote:
> On 2012-12-27 06:21, Bhavani Shankar R wrote:
>> [...]
>>
>> Thanks Niels,
>>
>> After some tweaking latest revision of the branch
>> http://bazaar.launchpad.net/~bhavi/ubuntu-app-review-board/lintian-arb_profile
>> works fine at runtime with namespace checks.
>>
>
> Great. :)
>
>> A small question I have here, Is there a way to integrate source
>> package tests in lintian for example in arb-lint the sourcepackages.py
>> file checks the source tar.gz file and as far as I know lintian is
>> used on .changes file or dsc or the deb after generating the same from
>> dpkg-buildpackage,
>>
>
> Yes, Lintian can check .dsc files and the related (.orig).tar.$comp
> files.   The built-in checks "debhelper" and "debian-source-dir" are
> examples of this.  Basically, the "Type" field in the .desc should
> contain "source" and the check will run on source packages.
>
> That said, the source checks apply to the built .dsc and not the
> unpacked package tree.  So there are some of the arb-lint checks that
> cannot be turned into a Lintian check[1].
>
> I had a quick look at the current arb-lint checks and I don't think it
> would make sense to implement:
>
>  * test_uses_deprecated_python_installation
>    - Lintian already has some related checks but only for the dh_*
>      helpers.  It is possible that Lintian should have a full check for
>      this in Jessie.  I am not really up to speed with Python packaging
>      in Debian, so you probably have to speak with some Python people.

Implemented basic dh_python2 transition test in the latest version
uploaded to PPA as a source check

>  * test_for_multiple_changelog_entries
>    - $info->changelog might be useful.

Implemented as a source check in latest upload

>  * test_has_maintainer_scripts
>    - checks/debhelper might be useful as an example.

Implemented as a source check in latest upload again

>  * test_is_lightweight_app
>    - checks/cruft might be useful as an example (e.g. File::Find
>      and $info->unpacked)
>

Modified the code and implemented a binary check (for now) based on
the number of lines of code (as files will be greater than 30 in most
cases I think). Thanks Niels!

>  * test_conflicts_replaces_breaks:
>    - Unless you intend to allow Breaks/Replaces/Conflicts via subst
>      variables (or/and generated via tools), I would probably do this
>      in a binary check.  For a binary check it is:
>
>        if (defined $info->field ('<field>')) {
>            tag 'field-not-allowed-...', '<field>';
>        }
>
>     For a source check it is:
>
>        foreach my $binpkg ($info->binaries) {
>            if (defined $info->binary_field ($binpkg, '<field>')) {
>                tag 'field-not-allowed-...', $binpkg, '<field>';
>            }
>        }
>

Implemented as a binary check in latest upload.

Thanks a lot Niels for your patience and ever informative reviews :) I
think for now this should cover most relevant arb-checks and should
hopefully replace arb-lint

Thanks a ton again!

Regards,


-- 
Bhavani Shankar
Ubuntu Developer       |  www.ubuntu.com
https://launchpad.net/~bhavi



More information about the App-review-board mailing list