Updates in the Lintian World

Documentation!

That is what the next version of Lintian will have. In 2.5.1, Lintian
had support for adding options in the lintianrc. Unfortunately, the
user had to guess the syntax, which makes the feature less useful.
With the next release, the manpage and the example config file[1]
will contain documentation and examples.

The User Manual[2] also saw some improvements. Particularly, it will
mention that lintian can process a .changes file and that it does
cross-package checks. Of course, it also documents the format of the
new Vendor Profiles. Though even with these improvements, the current
documentation still leaves much to be wanted.

The last “unpack” script (unpack-srcpkg-l1) was finally removed and
was replaced by a smarter version of index collection. This means
that Lintian can now schedule index in parallel with a few other
collections (namely unpacked, which is the current bottleneck).

The speed improvement is probably not noticeable, but it was also a
good time to upgrade our index collection to properly handle
multi-tarball source packages. Previously Lintian only extracted the
index from the “base” tarball.

The fields collection also saw some attention. Previously it
extracted fields from the control file (in the .deb, etc.) into a
directory. Each field became a file and the value of the field would
be written in the field. Today, the collection basically looks like
this:

[...]
if (-d 'fields'){
    system('rm', '-rf', 'fields') == 0
        or die 'Could not remove old fields directory';
}
[...]

It has been deprecated the minute Lintian::Collect API saw a little
upgrade to fetch these fields itself. This change should remove some
unnecessary file I/O in a normal run[3].

If you have a friend with his/her own little home-grown Lintian check
(or collection)[4], they will have to update it to A) not depend on
fields, B) use the Lintian::Collect API for accessing fields and C)
depend on index for source packages if it uses the index information.
For the latter, Lintian::Collect has grown support for source package
index.

Lintian has also seen a lot of decrufting in the 2.5.2 development
cycle. The new test suite now features skeletons (“standard base
environments”) and template support for all package test suites[5].

This means it takes a lot less of writing (or copy/waste) to generate
a simple specialized test in the low-level test suites. As a part
of cleaning up the test-suites, I got to run:

$ git rm t/{source,debs}/*/copyright

without breaking a single test. I have to admit that commit 8584996
is among my favorite ones in the 2.5.2 development cycle.

Finally, if you are one of the few that have ever used the
--packages-file option, then I am pleased to inform you that it will
be deprecated in 2.5.2 and replaced by --packages-from-file. The
old option had some specialized format, whereas the new option parses
the file (or stdin) as “one package per line”. The latter being far
more "find -name '*.deb' | "-friendly.

In case you are wondering why --packages-file is deprecated, here is
the packages-file parser from lintian 2.5.1:

    while (my $line = <$pkgin>) {
	chomp($line);
	my (undef, undef, undef, $file) = split(/\s+/, $line, 4);
	$pool->add_file($file);
    }

—-

[1] Installed as /etc/lintianrc

[2] Installed as /usr/share/doc/lintian/lintian.{html/,txt.gz}

[3] Namely, 2 opens + 2 closes + 1 read and one write for each field
in every package (the fields were cached, once they were read). Not
to mention a directory listing and having to remove the files again
later.

[4] Of course, you do not have such a thing… Because we all know
that no one (except this “not too close” friend of yours) messes with
Internal APIs of other projects…

[5] The exception being that the “changes” suite does not have a
standard base environment, since it would be completely unused.

Advertisements
This entry was posted in Debian, Lintian. Bookmark the permalink.

3 Responses to Updates in the Lintian World

  1. Micha says:

    Hi Niels,

    please consider to add a short summary on http://wiki.debian.org/DeveloperNews

    Regards,
    Micha

  2. It’s good to read about all the great work that you’ve been doing. But I echo Micha’s remark, at some point all this info must also end up on debian-devel / debian-devel-announce.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s