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

.changes files as first-class objects



Hi,

Apologies for not noting the fact in private/TODO (I had intended to,
but it must have slipped my mind :-/) but I've been having a look at the
changes required to promote .changes files to first-class checkable
objects; it turned out to be relatively easy to achieve.

I've uploaded a git-format-patch mbox and the result of "git diff
master" to http://people.debian.org/~adsb/lintian/ (I did try attaching
them, but the list server ate my mail for being oversized); comments
welcome.

There are a few areas I think are worth highlighting:

* The functionality of the malformed-changes-file test has changed.
Although a "malformed" .changes file (i.e. one missing a Format field)
will cause the remaining tests for changes files to be skipped, it is
possible that the file was sufficiently well-formed for Lintian to find
a Files stanza within it, in which case any properly formatted entries
therein will already have been scheduled.

* The "package" name for .changes files is now the filename with the
trailing ".changes" removed.  This is consistent with the current
functionality for .changes files, but does produce some odd results (as
demonstrated in a later point).

I debated using the Source field from the .changes instead which would
also work but means we need an extra piece of special-case code in
Schedule.pm for files without a Source field.

* The output format for changes tags has changed subtly as it is no
longer special cased; by way of an example:

-E: changed-by-no-name.changes: changed-by-name-missing someone@example.com
+E: changed-by-no-name changes: changed-by-name-missing someone@example.com

I think the new format is correct and is what should have been used all
along.

* Checking a .changes file using the XML output format adds a new
top-level element.  I'm of the opinion that the fact that it didn't
previously do so is a bug.

--- t/tests/lintian-output-xml/tags     2010-01-04 12:38:22.000000000 +0000
+++ debian/tests/tags.lintian-output-xml        2010-01-06 20:20:49.000000000 +0000
@@ -1,3 +1,5 @@
+<package type="changes" name="lintian-output-xml_1.0+dsfg-1.1_amd64" architecture="source all" version="1.0+dsfg-1.1">
+</package>

Adam


Reply to: