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

[SCM] Debian package checker branch, master, updated. 2.5.11-93-g506f48e



The following commit has been merged in the master branch:
commit 506f48e448d2d639e20939e48aa56e74e417134e
Author: Niels Thykier <niels@thykier.net>
Date:   Wed Jan 23 12:37:16 2013 +0100

    L::Lab: Fix bitrot of repair_lab and rename it to repair
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/debian/changelog b/debian/changelog
index 5e6637e..e4aff39 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -146,6 +146,8 @@ lintian (2.5.12) UNRELEASED; urgency=low
       "hashref" wait.
   * lib/Lintian/Lab.pm:
     + [NT] Add lab_query method to handle lab-queries directly.
+    + [NT] Fix bitrot of repair_lab and rename it to repair for
+      consistency.
   * lib/Lintian/Lab{,/Manifest}.pm:
     + [NT] Add support for grouping of manifests.
   * lib/Lintian/Lab/Manifest.pm:
diff --git a/lib/Lintian/Lab.pm b/lib/Lintian/Lab.pm
index f332c25..eb874b8 100644
--- a/lib/Lintian/Lab.pm
+++ b/lib/Lintian/Lab.pm
@@ -559,7 +559,7 @@ sub generate_diffs {
     return @diffs;
 }
 
-=item repair_lab
+=item repair
 
 Checks the lab contents against the current meta-data and syncs them.
 The lab must be open and should not be access while this method is
@@ -576,10 +576,10 @@ removing them.
 
 =cut
 
-sub repair_lab {
+sub repair {
     my ($self) = @_;
     my $updates = 0;
-    croak "Lab is not open.\n" unless $self->is_open;
+    croak "Lab is not open" unless $self->is_open;
     foreach my $pkg_type (keys %SUPPORTED_TYPES) {
         my $index = $self->_get_lab_index ($pkg_type);
         my $visitor = sub {
@@ -589,17 +589,14 @@ sub repair_lab {
             my $pkg_src_version = $metadata->{'source-version'};
             my $dir = $self->_pool_path ($pkg_src, $pkg_type, $pkg_name, $pkg_version, $pkg_arch);
             my $entry;
-            unless ( -d $dir && -f "$dir/.lintian-status") {
+            unless ( -d $dir) {
                 # The entry is clearly not here, remove it from the metadata
                 $index->delete (@keys);
                 $updates++;
-                -d $dir && rmdir $dir;
                 return;
             }
             eval {
-                $entry = Lintian::Lab::Entry->_new ($self, $pkg_name, $pkg_version, $pkg_arch,
-                                                    $pkg_type, undef, $pkg_src, $pkg_src_version,
-                                                    $dir);
+                $entry = Lintian::Lab::Entry->new_from_metadata ($pkg_type, $metadata, $self, $dir);
             };
             unless ($entry && $entry->exists) {
                 # We either cannot load the entry or it does not
@@ -617,6 +614,12 @@ sub repair_lab {
                 }
                 $index->delete (@keys);
                 $updates++;
+            } else {
+                unless (-f "$dir/.lintian-status" or $entry->update_status_file) {
+                    # if we cannot write the status file, scrap the entry.
+                    $entry->remove;
+                    $updates++;
+                }
             }
         };
 
diff --git a/t/scripts/Lintian/Lab/data/changes/lintian_2.5.10_amd64.changes b/t/scripts/Lintian/Lab/data/changes/lintian_2.5.10_amd64.changes
new file mode 100644
index 0000000..d316ead
--- /dev/null
+++ b/t/scripts/Lintian/Lab/data/changes/lintian_2.5.10_amd64.changes
@@ -0,0 +1,98 @@
+Format: 1.8
+Date: Sat, 30 Jun 2012 17:21:27 +0200
+Source: lintian
+Binary: lintian
+Architecture: source all
+Version: 2.5.10
+Distribution: unstable
+Urgency: low
+Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
+Changed-By: Niels Thykier <niels@thykier.net>
+Description: 
+ lintian    - Debian package checker
+Closes: 673276 678775
+Changes: 
+ lintian (2.5.10) unstable; urgency=low
+ .
+   * Summary of tag changes:
+     + Added:
+       - incompatible-java-bytecode-format
+       - unknown-java-class-version
+ .
+   * checks/changes-file.desc:
+     + [NT] Fix typo in tag description.  Thanks to Luca
+       Falavigna for spotting it.
+   * checks/files:
+     + [NT] Use new gzip decompressor from L::Util.
+   * checks/java{,.desc}:
+     + [NT] Catch unknown Java class versions.
+     + [NT] Catch uses of Java7 byte code as an experimental
+       check.  It lacks the proper checks for cases where
+       packages have the proper dependencies for Java7 byte
+       code.  (Closes: #673276)
+ .
+   * collection/*:
+     + [NT] Add missing load of the FileHandle module.
+   * collection/java-info{,.desc}:
+     + [NT] Use Archive::Zip instead of zipinfo + unzip to
+       extract information from Jar files.
+     + [NT] Limit java-info to files classified as "Zip Archive"
+       by file(1).
+   * collection/objdump-info:
+     + [NT] Only call readelf once per binary.
+     + [NT] Use xargs + a new helper to reduce the number of
+       readelf calls even further.
+   * collection/objdump-info-helper:
+     + [NT] New file.
+   * collection/strings:
+     + [NT] Optimize for the "common case" file names with a
+       fall-back to previous behaviour with special file names.
+   * collection/strings-helper:
+     + [NT] New file.
+ .
+   * debian/control:
+     + [NT] Add (Build-)Dependency on libarchive-zip-perl.
+     + [NT] Remove runtime dependency on unzip (replaced by
+       libarchive-zip-perl).
+     + [NT] Add explicit Build-Dependency on xz-utils instead
+       of relying on dpkg-dev's dependency on it.
+     + [NT] Add versioned xz-utils as alternative to xz-lzma
+       or lzma.  (Closes: #678775)
+     + [NT] Add missing suggests for lzma packages.  lzma is
+       only used for source packages compressed with lzma.
+     + [NT] Add suggests on libperlio-gzip-perl.
+ .
+   * frontend/lintian:
+     + [NT] Check if some collections can be skipped for existing
+       entries.  This is mostly useful for static labs, where
+       certain checks can be now be rerun without having to run
+       "unpacked".
+     + [NT] Emit run times of collections and checks with debug
+       level 2 (or higher).
+     + [NT] Load lintian's libraries earlier.
+     + [NT] Add new option "--jobs" to control the number of
+       unpacking jobs Lintian will schedule in parallel.
+     + [NT] Improve Lintian's job scheduler to schedule unpacking
+       jobs on a group level rather than just a package level.
+ .
+   * lib/Lintian/Collect/[Binary,Package}.pm:
+     + [NT] Use new gzip decompressor from L::Util.
+   * lib/Lintian/CollScript.pm:
+     + [NT] New file.
+   * lib/Lintian/Util.pm:
+     + [NT] Add gzip decompressor preferring libperlio-perl if
+       available, but with fallback to a "fork+exec" of gzip.
+     + [NT] Load Digest::SHA immediately like Digest::MD5.
+Checksums-Sha1: 
+ ea252bf1960aed48a93766b7bdc6a0c9f18f51d1 2556 lintian_2.5.10.dsc
+ 4fc358f2aeb6b797f580b75a254390f7cf2f7551 1105393 lintian_2.5.10.tar.gz
+ 736dc7b2ef09398327ea270bdcb1b51ccf479758 707676 lintian_2.5.10_all.deb
+Checksums-Sha256: 
+ b29adb3b1eadbc00be0274f09f5345954e1340672e76f7b3f56af2b153a08b74 2556 lintian_2.5.10.dsc
+ 249f1a23d14d824151181728cc026e0971a5960ce7f7b1b383cc1e42e4244961 1105393 lintian_2.5.10.tar.gz
+ d1405f3aeffe079c75d2a2ee56666b3e6f20eb3e3ce5c77f7888bf4838400f31 707676 lintian_2.5.10_all.deb
+Files: 
+ 8767bfbf1b004474936eb319b60f8dae 2556 devel optional lintian_2.5.10.dsc
+ 5dd1d5ca1ab71f672b34992e249064ca 1105393 devel optional lintian_2.5.10.tar.gz
+ e45c47e1110e05f76dc7df35f5f501c4 707676 devel optional lintian_2.5.10_all.deb
+
diff --git a/t/scripts/Lintian/Lab/data/changes/lintian_2.5.10_source.changes b/t/scripts/Lintian/Lab/data/changes/lintian_2.5.10_source.changes
new file mode 100644
index 0000000..4281fa1
--- /dev/null
+++ b/t/scripts/Lintian/Lab/data/changes/lintian_2.5.10_source.changes
@@ -0,0 +1,94 @@
+Format: 1.8
+Date: Sun, 17 Jun 2012 23:25:06 +0200
+Source: lintian
+Binary: lintian
+Architecture: source
+Version: 2.5.10
+Distribution: UNRELEASED
+Urgency: low
+Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
+Changed-By: Niels Thykier <niels@thykier.net>
+Description: 
+ lintian    - Debian package checker
+Closes: 673276 678775
+Changes: 
+ lintian (2.5.10) UNRELEASED; urgency=low
+ .
+   * Summary of tag changes:
+     + Added:
+       - incompatible-java-bytecode-format
+       - unknown-java-class-version
+ .
+   * checks/changes-file.desc:
+     + [NT] Fix typo in tag description.  Thanks to Luca
+       Falavigna for spotting it.
+   * checks/files:
+     + [NT] Use new gzip decompressor from L::Util.
+   * checks/java{,.desc}:
+     + [NT] Catch unknown Java class versions.
+     + [NT] Catch uses of Java7 byte code as an experimental
+       check.  It lacks the proper checks for cases where
+       packages have the proper dependencies for Java7 byte
+       code.  (Closes: #673276)
+ .
+   * collection/*:
+     + [NT] Add missing loads of FileHandle module.
+   * collection/java-info{,.desc}:
+     + [NT] Use Archive::Zip instead of zipinfo + unzip to
+       extract information from Jar files.
+     + [NT] Limit java-info to files classified as "Zip Archive"
+       by file(1).
+   * collection/objdump-info:
+     + [NT] Only call readelf once per binary.
+     + [NT] Use xargs + a new helper to reduce the number of
+       readelf calls even further.
+   * collection/objdump-info-helper:
+     + [NT] New file.
+   * collection/strings:
+     + [NT] Optimize for the "common case" file names with a
+       fall-back to previous behaviour with special file names.
+   * collection/strings-helper:
+     + [NT] New file.
+ .
+   * debian/control:
+     + [NT] Add (Build-)Dependency on libarchive-zip-perl.
+     + [NT] Remove runtime dependency on unzip (replaced by
+       libarchive-zip-perl).
+     + [NT] Add explicit Build-Dependency on xz-utils instead
+       of relying on dpkg-dev's dependency on it.
+     + [NT] Add versioned xz-utils as alternative to xz-lzma
+       or lzma.  (Closes: #678775)
+     + [NT] Add missing suggests for lzma packages.  lzma is
+       only used for source packages compressed with lzma.
+     + [NT] Add suggests on libperlio-gzip-perl.
+ .
+   * frontend/lintian:
+     + [NT] Check if some collections can be skipped for existing
+       entries.  This is mostly useful for static labs, where
+       certain checks can be now be rerun without having to run
+       "unpacked".
+     + [NT] Emit run times of collections and checks with debug
+       level 2 (or higher).
+     + [NT] Load lintian's libraries earlier.
+     + [NT] Add new option "--jobs" to control the number of
+       unpacking jobs Lintian will schedule in parallel.
+     + [NT] Improve Lintian's job scheduler to schedule unpacking
+       jobs on a group level rather than just a package level.
+ .
+   * lib/Lintian/Collect/[Binary,Package}.pm:
+     + [NT] Use new gzip decompressor from L::Util.
+   * lib/Lintian/CollScript.pm:
+     + [NT] New file.
+   * lib/Lintian/Util.pm:
+     + [NT] Add gzip decompressor preferring libperlio-perl if
+       available, but with fallback to a "fork+exec" of gzip.
+     + [NT] Load Digest::SHA immediately like Digest::MD5.
+Checksums-Sha1: 
+ b4b96b4d27c2cda31acf6d01b2e0654b6a09a132 1670 lintian_2.5.10.dsc
+ 8ea77c3b4a81fcbb63bac6a0847c687d4ddf2534 1105415 lintian_2.5.10.tar.gz
+Checksums-Sha256: 
+ e15ca14cfbf30e0086cb5942b395f34a7d933e5668b3c7fa2b3900fed1ee98d2 1670 lintian_2.5.10.dsc
+ 5b91379747dfb6a779e4117db4a5bfb41154e97854de11b21475ddd273343c9c 1105415 lintian_2.5.10.tar.gz
+Files: 
+ dda8d51e21900fd23393d2d4401e13d8 1670 devel optional lintian_2.5.10.dsc
+ b99b2e42c3b933efb8b147745dabdc46 1105415 devel optional lintian_2.5.10.tar.gz
diff --git a/t/scripts/Lintian/Lab/data/changes/lintian_2.5.11_amd64.changes b/t/scripts/Lintian/Lab/data/changes/lintian_2.5.11_amd64.changes
new file mode 100644
index 0000000..b366fed
--- /dev/null
+++ b/t/scripts/Lintian/Lab/data/changes/lintian_2.5.11_amd64.changes
@@ -0,0 +1,272 @@
+Format: 1.8
+Date: Tue, 11 Dec 2012 22:12:06 +0100
+Source: lintian
+Binary: lintian
+Architecture: source all
+Version: 2.5.11
+Distribution: experimental
+Urgency: low
+Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
+Changed-By: Niels Thykier <niels@thykier.net>
+Description: 
+ lintian    - Debian package checker
+Closes: 623265 658474 660655 672273 673073 677874 677890 678639 678896 680391 681410 681769 681894 683224 683516 685497 686179 686352 687464 688320 688494 690014 690910 691489 692232 692616 693013 693442 693589 694328
+Changes: 
+ lintian (2.5.11) experimental; urgency=low
+ .
+   * Summary of tag changes:
+     + Added:
+       - conffile-has-bad-file-type
+       - debug-package-for-multi-arch-same-pkg-not-coinstallable
+       - dm-upload-allowed-is-obsolete
+       - field-name-typo-in-dep5-copyright
+       - font-adobe-copyrighted-fragment
+       - license-problem-json-evil
+       - maintainer-script-has-unexpanded-debhelper-token
+       - shlibs-uses-obsolete-relation
+       - untranslatable-debconf-templates
+     + Removed:
+       - apparently-truncated-elf-binary
+       - data.tar.xz-member-without-dpkg-pre-depends
+       - debhelper-overrides-need-versioned-build-depends
+       - no-source-field
+       - preinst-uses-dpkg-maintscript-helper-without-predepends
+ .
+   * checks/*:
+     + [NT] Remove assumption that lintian will chdir into the
+       the lab before calling the check.
+     + [NT] Be better at avoiding false-positive spelling errors
+       for references to packages that also happen to be common
+       spelling mistake.  Thanks to Paul Tagliamonte for the
+       report.  (Closes: #687464)
+   * checks/binaries{,.desc}:
+     + [NT] Merge apparently-truncated-elf-binary into
+       apparently-corrupted-elf-binary.
+     + [NT] Remove some references to objdump in tag descriptions
+       as Lintian uses readelf.
+     + [JW,NT] Update the "extract SONAME" shell snippet to properly
+       handle SONAMEs with uppercase letters.
+     + [JW] Recognise any path with matching the GNU multi-arch
+       triplet as a "Multi-arch: same"-safe directory.  Thanks to
+       Matthias Klose for the report.  (Closes: #681410)
+   * checks/changelog-file:
+     + [NT] Emit "missing changelog" for packages that are missing
+       their usr/share/doc/<pkg>/ dir and do not have a doc symlink.
+       Thanks to Faheem Mitha for the report.  (Closes: #683224)
+   * checks/conffiles{,.desc}:
+     + [NT] Remove leading slash on the filename when emitting
+       file-in-etc-rc.d-marked-as-conffile.
+     + [NT] Add check for "non-file" conffiles.  Thanks to Guillem
+       Jover for the report.  (Closes: #690910)
+   * checks/control-file.desc:
+     + [NT] Bump obsolete-relation-form-in-source to serious as these
+       forms are now "must not" instead of "should not".
+   * checks/copyright.desc:
+     + [NT] Bump debian-copyright-file-uses-obsolete-national-encoding
+       to serious as copyright files must now be UTF-8 encoded.
+   * checks/cruft{,.desc}:
+     + [NT] Detect MS-DOS executables as windows binaries.
+     + [NT] Bump the version of config.{guess,sub} needed for
+       triggering the "outdated-autotools-helper-file" tag for arm64
+       support.  Thanks to Paul Wise for the report and the
+       investigative work.  (Closes: #690014)
+     + [RA,NT] Extend the description of the tags {outdated,ancient}-
+       autotools-helper-file to mention that dh-autoreconf might be
+       helpful tool.
+     + [NT] Apply patch from Bastien Roucariès to detect file licensed
+       under the "Good, not Evil"-JSON license.  (Closes: #692616)
+   * checks/deb-format{,.desc}:
+     + [NT] Retire data.tar.xz tag.  (Closes: #680391)
+   * checks/debhelper{,.desc}:
+     + [JW,NT] Consider missing versioned build-depends on
+       debhelper for compat 8 (or less) a pedantic issue.
+       (Closes: #681894)
+     + [NT] Retire debhelper-overrides-need-versioned-build-depends.
+   * checks/fields{,.desc}:
+     + [NT] Retire no-source-field since Lintian cannot emit it any
+       more due to dpkg-source refusing to extract such source
+       packages.
+     + [NT] Add tag for using the obsolete DMUA field.  Thanks to
+       Ansgar Burchardt for the report.  (Closes: #688494)
+     + [NT] Apply patches from Bernhard R. Link to check for
+       unintentional whitespace and use of non-cannical URIs in
+       Vcs-* fields.  (Closes: #681769)
+     + [NT] Fix false-positive caused by insignificant whitespace.
+       Thanks to Dima Kogan for the report.  (Closes: #693589)
+   * checks/files:
+     + [RG] Recognise smarty3 as smarty itself.
+     + [NT] Consider "tasksel tasks" as a meta package.
+       (Closes: #691489)
+     + [NT] Add patch from Bastien Roucariès to check for adobe font
+       license issues.  (Closes: #694328)
+   * checks/group-checks{,.desc}:
+     + [NT] Detect debug packages not co-installable with itself,
+       when it provides debug symbols for a Multi-Arch: same package.
+       Thanks to Carsten Hey for the report.  (Closes: #678896)
+   * checks/infofiles:
+     + [NT] Use L::Util's gzip decompressor rather than zcat.
+   * checks/init.d{,.desc}:
+     + [NT] Move file-in-etc-rc.d-marked-as-conffile to conffiles
+       check.
+     + [NT] Use L::Collect's conffile API instead of accessing the
+       "conffiles" control file directly.
+   * checks/java.desc:
+     + [NT] Remove the "experimental" marker of the Java byte-code
+       check.
+   * checks/manpages{,.desc}:
+     + [CW,NT] Manually do redirects and chdir rather than
+       invoking a shell when calling man and lexgrog.
+     + [CW,NT] Be stricter with missing roff preprocessors by
+       setting MANROFFSEQ to the empty string when calling man.
+     + [CW,NT] Pass -Tutf8 -Z to man to skip an unused part of
+       the groff pipeline.  (Closes: #677874)
+     + [CW,NT] Use the L::Util gzip decompressor to open gzipped
+       manpages.
+   * checks/menu-format{,.desc}:
+     + [NT] Move a table of categories to a data file.
+     + [NT] Update description of menu-icon-missing.  Lintian is now
+       sometimes able to find the icon in dependencies (if they are
+       built from the same source).  Thanks to Ryan Kavanagh for the
+       report and the suggested patch.  (Closes: #683516)
+   * checks/md5sums:
+     + [NT] Use L::Collect's conffile API instead of accessing the
+       "conffiles" control file directly.
+   * checks/po-debconf{,.desc}:
+     + [NT] Check for untranslatable templates that should be
+       translatable.  Thanks to David Prévot for the report and the
+       patch.  (Closes: #686179)
+   * checks/scripts{,.desc}:
+     + [NT] Retire check for dpkg-maintscript-helper in preinst.
+       (Closes: #685497)
+     + [NT] Fix false positive "executable-not-elf-or-script" when
+       the file is an executable hardlink to a script.
+     + [NT] Check maintainer scripts for unexpanded #DEBHELPER# tokens.
+       Thanks to Cyril "KiBi" Brulebois for the suggestion.
+     + [NT] Fix false-positive for removal of device files as /dev/shm
+       is not a device.  Thanks to Steve Langasek for the report and
+       Roger Leigh for the extra info.  (Closes: #693442)
+   * checks/shared-libs{,.desc}:
+     + [NT] Clearify the description of dev-pkg-without-shlib-symlink
+       to mention that the dev symlink is always expected in /usr.
+     + [NT] Add missing "+" in libtool regex.  Thanks to Leo 'costela'
+       Antunes for the report.
+     + [RA,NT] Check for use of obsolete "<" and ">" in shlibs control
+       files.  (Closes: #660655)
+   * checks/source-copyright{,.desc}:
+     + [NT] Check for possible misspellings of known field
+       names.  (Closes: #678639)
+     + [NT] Fix typo of paragraph.  Thanks to Logan Rosen for spotting
+       it.  (Closes: #693013)
+   * checks/version-substvars{,.desc}:
+     + [JW,NT] Extend version-substvar-for-external-package to
+       all relations.  Previously it was only triggered for
+       strong dependnecy relations.  (Closes: #658474)
+ .
+   * collection/deb-format.desc:
+     + [NT] Remove unneeded changelog-file from "Needs-Info".
+   * collection/objdump-info{,-helper,.desc}:
+     + [NT] Change the output format for the collection and
+       bump the version of the collection accordingly.
+     + [NT] Apply patch from Peter Pentchev to ensure set{u,g}id
+       ELF binaries are properly processed, even when Lintian is
+       run as root.  (Closes: #686352)
+ .
+   * data/binaries/embedded-libs:
+     + [RG] Check for embedded copies of jsoncpp.
+   * data/fields/archive-sections:
+     + [NT] Add new "tasks" section.
+   * data/menu-format/add-categories:
+     + [NT] New file.
+   * data/output/ftp-master-{,non}fatal:
+     + [NT] Removed, not used at run time.
+   * data/scripts/interpreters:
+     + [NT] Add nodejs and Rscript as a known interpreter.
+       Thanks to Marcelo Jorge Vieira and Sébastien Boisvert
+       for the report.  (Closes: #623265, #692232)
+   * data/spelling/corrections:
+     + [NT,RG] Add more corrections.
+     + [RG] Re-sort the corrections.
+ .
+   * debian/control:
+     + [NT] Add (Build-)Depends on libtext-levenshtein-perl.
+     + [NT] Use anonscm.d.o in the Vcs-* fields instead of
+       git.d.o.
+   * debian/lintian.install:
+     + [NT] Install Lintian perl modules in /usr/share/perl5.
+   * debian/rules:
+     + [NT] Add target to generate HTML API doc.  Currently
+       this is only run manually.
+ .
+   * frontend/lintian:
+     + [NT] Remove chdir calls for checks.
+     + [NT] Retire depreciated command line and config options.
+     + [NT] Refactor unpackaging into Lintian::Unpacker.
+     + [NT] Make parameter for --jobs optional.  In its absence
+       Lintian will not limit the number of parallel jobs.
+     + [JW,NT] During the unpack phase, emit the name of the
+       group currently being unpacked when --verbose is given.
+       (Closes: #677890)
+     + [JW] Fix typo of Parallelization.
+     + [NT] Fix regression where --suppress-tags{,-from-file}
+       was ignored if -C or -X was passed.  Thanks to Thorsten
+       Glaser for reporting it.  (Closes: #688320)
+ .
+   * lib/Lintian/Collect{,/Source}.pm:
+     + [NT] Add optional parameter to field (and X_field)
+       methods that denotes the default value if a field is
+       missing.  This avoid some boiler plate for callers
+       of the methods.
+   * lib/Lintian/Collect/Binary.pm:
+     + [NT] Bump API for objdump method.
+     + [NT] Add API for checking if a file is considered a
+       conffile.
+   * lib/Lintian/Collect/Package.pm:
+     + [NT] Strip leading slash off files extracted from tar.
+   * lib/Lintian/Command.pm:
+     + [NT] Work around a leak in IPC::Run (see #301774).
+   * lib/Lintian/Internal/FrontendUtil.pm:
+     + [NT] Always use Dpkg::Vendor to determine the default
+       vendor.  Previously dpkg-vendor would be preferred if
+       available.
+   * lib/Lintian/Lab/Entry.pm:
+     + [NT] Use the L::Collect during creation instead of
+       manually reading the dsc for source packages.
+   * lib/Lintian/Profile.pm:
+     + [NT] Add support for the new optional "Load-Checks"
+       field in profiles.
+     + [NT] Ensure that the "lintian" check is always loaded
+       as these tags are not emitted by check modules.  Also
+       enable the tags from the check by default.
+   * lib/Lintian/Tags.pm:
+     + [NT] Be explicit about the reason when rejecting an
+       override.  Thanks to Yves-Alexis Perez for the report.
+       (Closes: #673073)
+   * lib/Lintian/Unpacker.pm:
+     + [NT] New file.
+ .
+   * man/lintian.pod.in:
+     + [NT] Remove documentation about removed options.
+ .
+   * reporting/graphs/{statistics,tags}.gpi:
+     + [JP] New file.
+   * reporting/html_reports:
+     + [JP,NT] Generate graphs of the collected history data.
+       (Closes: #672273)
+     + [NT] Make the mirror name configurable.
+ .
+   * vendors/ubuntu/main/data/changes-file/known-dists:
+     + [NT] Add "raring" as known Ubuntu distribution.  Thanks to
+       Dmitry Shachnev.  (LP: #1068208)
+Checksums-Sha1: 
+ 850fcd4ceaf870dd6ac276c15c43b104dba52e9b 2602 lintian_2.5.11.dsc
+ c83143fc76461efbdfd687ea63964c650de9511e 1140318 lintian_2.5.11.tar.gz
+ 2148b6ee048eb28026990c33a25d16d2ea555d7e 733808 lintian_2.5.11_all.deb
+Checksums-Sha256: 
+ 482bf299f9e3e77467b06fe7a49e719d961584a4826db73a84333fe709a209a5 2602 lintian_2.5.11.dsc
+ 91f96295eac39c4711a1e53715f9c4324539665ef8aa4c1500af5ba5efd39cd5 1140318 lintian_2.5.11.tar.gz
+ 9f33060a392f8cf1adf8ed37041d66fe2a270d01732386ea5fbb3fe700c4670d 733808 lintian_2.5.11_all.deb
+Files: 
+ 8b4bd5c4bea641f0ff2f0d957fbbea78 2602 devel optional lintian_2.5.11.dsc
+ 90000a9fc6b5a7061f63154a946f9b79 1140318 devel optional lintian_2.5.11.tar.gz
+ 5bd3ff3eb29a80322a57cdbe2676bfbd 733808 devel optional lintian_2.5.11_all.deb
+
diff --git a/t/scripts/Lintian/Lab/data/changes/lintian_2.5.7_amd64.changes b/t/scripts/Lintian/Lab/data/changes/lintian_2.5.7_amd64.changes
new file mode 100644
index 0000000..1c4353a
--- /dev/null
+++ b/t/scripts/Lintian/Lab/data/changes/lintian_2.5.7_amd64.changes
@@ -0,0 +1,264 @@
+Format: 1.8
+Date: Mon, 14 May 2012 23:45:08 +0200
+Source: lintian
+Binary: lintian
+Architecture: source all
+Version: 2.5.7
+Distribution: unstable
+Urgency: low
+Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
+Changed-By: Niels Thykier <niels@thykier.net>
+Description: 
+ lintian    - Debian package checker
+Closes: 614034 628189 648777 649277 649852 650536 657402 660845 663516 664061 664471 664600 666207 666765 668546 671024 671537 672615
+Changes: 
+ lintian (2.5.7) unstable; urgency=low
+ .
+   * Summary of tag changes:
+     + Added:
+       - apache2-configuration-files-need-conf-suffix
+       - apache2-deprecated-auth-config
+       - apache2-module-depends-on-real-apache2-package
+       - apache2-module-does-not-depend-on-apache2-api
+       - apache2-module-does-not-ship-load-file
+       - apache2-reverse-dependency-calls-invoke-rc.d
+       - apache2-reverse-dependency-calls-wrapper-script
+       - apache2-reverse-dependency-ships-file-in-not-allowed-directory
+       - apache2-reverse-dependency-uses-obsolete-directory
+       - apache2-unparseable-dependency
+       - apache2-unsupported-dependency
+       - diff-contains-quilt-control-dir
+       - hardening-no-fortify-functions
+       - hardening-no-relro
+       - hardening-no-stackprotector
+       - non-standard-apache2-configuration-name
+       - non-standard-apache2-module-package-name
+       - rc-version-greater-than-expected-version
+       - udeb-uses-unsupported-compression-for-data-tarball
+       - web-application-depends-on-apache2-data-package
+       - web-application-should-not-depend-unconditionally-on-apache2
+     + Removed:
+       - ancient-dpkg-long-filenames-check
+       - ancient-dpkg-predepends-check
+       - bad-ubuntu-distribution-in-changes-file
+       - binary-nmu-uses-old-version-style
+       - debian-control-with-duplicate-fields
+       - doc-base-file-references-usr-doc
+       - duplicate-fields-in-templates
+       - manpage-for-non-x11-binary-in-wrong-directory
+       - manpage-for-x11-binary-in-wrong-directory
+       - missing-dependency-on-install-info
+       - obsolete-field
+       - old-app-defaults-directory
+       - old-style-copyright-file
+       - old-style-example-dir
+       - package-installs-file-to-usr-x11r6-bin
+       - package-installs-font-to-usr-x11r6
+       - package-uses-obsolete-file
+       - postinst-should-not-set-usr-doc-link
+       - raster-image-in-scalable-directory
+       - udeb-uses-non-gzip-data-tarball
+       - x11-games-should-be-in-usr-games
+ .
+   * checks/*:
+     + [NT] Remove some old tags that are no longer useful.
+       (Closes: #663516)
+     + [NT] Migrate to sorted_index from sorted_file_info.
+     + [NT] Explicitly import needed subs from L::Util.
+   * checks/apache2{,.desc}:
+     + [NT] New files to check for apache2 related packages.  Thanks
+       to Arno Töll and Stefan Fritsch for the patches.
+       (Closes: #668546)
+     + [NT] This check is not enabled by default.  It can be used
+       via the debian/extra-apache2 profile.
+   * checks/binaries{,.desc}:
+     + [NT] Move embedded library data to a data file.
+     + [NT] Add ELF hardening checks.  Thanks to Kees Cook for
+       report and the patches.  (Closes: 650536)
+     + [NT] Replace architecture tables with data files.
+     + [JW] Check for missing Python3 numpy ABI dependency.
+       (Closes: #671024)
+   * checks/changelog-file:
+     + [NT] Output the correct line number for the "line-too-long"
+       tag.  Thanks to Arno Töll for the report.  (Closes: #657402)
+   * checks/changes-file{,.desc}:
+     + [NT] Remove Ubuntu specific handling of distribution names.
+       Instead replace it with a more generalized one that derivatives
+       can reuse by extending vendor specific data files.  Thanks to
+       Daniel Dehennin for the suggestion.  (Closes: #648777)
+   * checks/control-file:
+     + [NT] Rewrote parts to use Lintian::Collect for fetching data.
+   * checks/cruft{,.desc}:
+     + [NT] Check for quilt control dirs in the debian packaging files.
+   * checks/deb-format{,.desc}:
+     + [NT] Replace old udeb compression tag with a more general
+       one.  (Closes: #664600)
+     + [NT] Remove logic for checking if a deb is meant for
+       Ubuntu.  Instead unconditionally emit the tag and let the
+       vendor profiles handle it.
+   * checks/debconf:
+     + [NT] Special case debconf providers for purge-debconf tag.
+       Generally they cannot use db_purge in postrm (for obvious
+       reasons), so the tag will be a false-positive in such
+       cases.
+   * checks/fields{,.desc}:
+     + [NT] Add devref reference.
+     + [NT] Remove special handling of the Ubuntu specific field,
+       "original-maintainer".  This field is now handled by vendor
+       specific data files.  (Closes: #649852)
+     + [JW,NT] Check for common mistakes with preview release and
+       release candidate versions.  For non-native packages, this
+       check is only done on initial uploads of new upstream
+       releases.  Thanks to Stefano Rivera and Julian Taylor for
+       their additional suggestions.  (Closes: #649277)
+   * checks/filename-length.desc:
+     + [ADB, NT] Reword description of package-has-long-file-name.
+       Thanks to Andreas Beckmann for suggestion.
+   * checks/files{,.desc}:
+     + [NT] Remove "manual" lazy loads of data files.
+     + [NT] Remove code for the uses-FHS-doc-dir tag.
+     + [NT] Extend icon checks to all icon directories and look for
+       raster images in "scalable" icon directories.  Thanks to
+       Paul Wise for the report and Felix Geyer for the patches.
+       (Closes: #628189)
+   * checks/group-checks:
+     + [NT] Include Provides when checking for conflict relations.
+       Thanks to Damyan Ivanov for the report.  (Closes: #672615)
+   * checks/java:
+     + [NT] Ignore "codeless" jars if they appear to be maven
+       javadoc jars.  Thanks to Ludovic Claude for the patch.
+       (Closes: #660845)
+   * checks/lintian.desc:
+     + [NT] Updated the description of the override tags.
+   * checks/manpages{,.desc}:
+     + [RA] Detect hyphen used as minus sign following a groff \f[C] font
+       change.  Thanks, Iustin Pop.  (Closes: #664471)
+   * checks/menu-format:
+     + [NT] Move menu section lists into a data file.
+     + [NT] If a package is missing a menu icon, check its direct strong
+       dependencies built from the same source (if any) for the icon.
+       This fixes false-positives menu-icon-missing in some cases.
+   * checks/menus{,.desc}:
+     + [NT] Remove "manual" lazy load of data file.
+   * checks/nmu:
+     + [NT] Remove Ubuntu specific code to handle their (lack of) NMUs.
+       These tags are instead suppressed by the Ubuntu profile.
+   * chekcs/rules:
+     + [NT] Fix false-positive "ignores-make-clean-error" tag caused by
+       using make with -C and a dir containing the letter "i".  Thanks to
+       Tobias Hansen for the report.  (Closes: #671537)
+   * checks/scripts{,.desc}:
+     + [NT] Mention devref 6.4 in command-with-path-in-maintainer-script.
+       Thanks to Arno Töll for the patch.
+     + [NT] Do not emit unusual-interpreter if the package provides the
+       interpreter itself.
+     + [NT] Ignore the lack of exec bit on th debconf shell modules.
+   * checks/standards-version.desc:
+     + [NT] Add references to the Policy upgrading checklist.  Thanks to
+       Simon Paillard for the patch.
+ .
+   * collection/*:
+     + [NT] Use Lintian::Collect to access the package index.
+   * collection/bin-pkg-control{,.desc}:
+     + [NT] Compress control-index file and bump version of
+       bin-pkg-control.
+   * collection/copyright-file:
+     + [NT] Remove code to look for old-style copyright file.
+   * collection/file-info{,.desc}:
+     + [NT] Compress file-info output and bump version of file-info.
+   * collection/hardening-info{,.desc}:
+     + [NT] New files.  Thanks to Kees Cook for the patch.
+   * collection/index{,.desc}:
+     + [NT] Compress index output and bump version of index.
+   * collection/java-info{,.desc}:
+     + [NT] Compress java-info output and bump version of java-info.
+   * collection/objdump-info:
+     + [NT] Use "fail" from Lintian::Util.pm rather than embedding a
+       copy of it.
+     + [NT] Use Lintian::Collect to find ELF files.
+     + [NT] Replace all usage of objdump with readelf.
+       (Closes: #614034)
+     + [NT] Compress objdump-info output and bump version of objdump-info.
+   * collection/strings{,.desc}:
+     + [NT] Compress strings output and bump version of strings.
+ .
+   * data:
+     + [NT] Move to vendors/debian/ftp-master-auto-reject and replace
+       it with a symlink.
+   * data/binaries/{arch-{64bit-equivs,regex},hardening-tags}:
+     + [NT] New file.
+   * data/binaries/embedded-libs:
+     + [NT] New file.
+     + [NT] Add libav libraries.  Thanks to Andres Mejia for the
+       suggestion and the suggested patch.  (Closes: #666765)
+   * data/changes-file/{debian-dists -> known-dists}:
+     + [NT] Renamed file.
+   * data/menu-format/menu-sections:
+     + [NT] New file.
+ .
+   * debian/changelog:
+     + [NT] Amend the 2.5.5 to mention that it also added the tag
+       binaries-have-file-conflict.
+ .
+   * frontend/lintian:
+     + [JW] Fix typo in error message.
+     + [JW,NT] Fix handling of "override" option in the lintianrc file.
+       (Closes: #666207)
+ .
+   * lib/Lintian/Architecture.pm:
+     + [NT] Lazily evaluate the data file.
+   * lib/Lintian/Collect/Package.pm:
+     + [NT] Remove an extra level of quoting in index.
+     + [NT] Remove root dir from sorted_index.
+     + [NT] Keep trailing slash in dir names for file_info.
+   * lib/Lintian/Collect/Binary.pm:
+     + [NT] Remove sorted_file_info as sorted_index now produces
+       an identical list.
+   * lib/Lintian/Data.pm:
+     + [NT] Lazily load data files.
+     + [NT] Allow pre-process sub to alter existing value for a key
+       by passing the previous value as third argument.
+     + [NT] Allow vendor specific data files.  They will be loaded
+       from LINTIAN_ROOT/vendors/$profile/data.
+   * lib/Lintian/Output{,/*}.pm:
+     + [NT] Replace non-printables with "?" in output.
+   * lib/Lintian/Profile.pm:
+     + [NT] Normalize profile name and replace "parents" with
+       "profile_list".  The latter also includes the current profile
+       name.
+   * lib/Lintian/Tag/Info.pm:
+     + [NT] Use Lintian::Data to load the manual-references data
+       file instead using an ad-hoc parser.
+   * lib/{Text_utils => Lintian/Tag/TextUtil}.pm:
+     + [NT] Renamed module.
+   * lib/{Util => Lintian/Util}.pm:
+     + [NT] Renamed Util to Lintian::Util.
+     + [JW] Consider duplicate fields a syntax error in dctrl files.
+       Previously, duplicate fields were silently ignored (except
+       when a separate tag would check for it).  (Closes: #664061)
+     + [NT] Stop exported a majority of all subs by default.
+ .
+   * profiles/ubuntu/main.profile:
+     + [NT] Add a number of NMU related tags to the list of disabled
+       tags.
+ .
+   * vendors/ubuntu/main/data/changes-file/known-dists:
+     + [NT] New file based on data/changes-file/ubuntu-dists.
+     + [ADB] Add "quantal" (Quetzal)
+   * vendors/ubuntu/main/data/common/source-fields:
+     + [NT] New file.
+   * vendors/ubuntu/main/data/fields/{binary,udeb}-fields:
+     + [NT] New files.
+Checksums-Sha1: 
+ 0b03babd3aa8571eb0af02af768f7c4fade12fbd 2462 lintian_2.5.7.dsc
+ 3af1c36dbe4ae3dc7b70aa375107928c28c8555f 1087847 lintian_2.5.7.tar.gz
+ 2ebf64764da8e9b03cea8555ec6db1cf5da38f59 692506 lintian_2.5.7_all.deb
+Checksums-Sha256: 
+ 0dd400eff2da35e2e1b39370a0edf8a918ce3e3cdd68b6be2fcb53ae8a143e5f 2462 lintian_2.5.7.dsc
+ c56d7550e10acb7672708911c7636611d128ab7ec3eded8e70035737581f1a26 1087847 lintian_2.5.7.tar.gz
+ 5fd3554d5e76aa70334a4a56f87c75fe6a287b9723d64330621d7a423fffb2a0 692506 lintian_2.5.7_all.deb
+Files: 
+ ab60445e9f6618d0b9349dbc8e3455c3 2462 devel optional lintian_2.5.7.dsc
+ ec47bdf0735e61fffd0a582cd76cdb74 1087847 devel optional lintian_2.5.7.tar.gz
+ af45b86b4b0a254ab0cb46fab4de2bbf 692506 devel optional lintian_2.5.7_all.deb
+
diff --git a/t/scripts/Lintian/Lab/data/changes/lintian_2.5.8_amd64.changes b/t/scripts/Lintian/Lab/data/changes/lintian_2.5.8_amd64.changes
new file mode 100644
index 0000000..bd3d11f
--- /dev/null
+++ b/t/scripts/Lintian/Lab/data/changes/lintian_2.5.8_amd64.changes
@@ -0,0 +1,106 @@
+Format: 1.8
+Date: Tue, 29 May 2012 11:49:47 +0200
+Source: lintian
+Binary: lintian
+Architecture: source all
+Version: 2.5.8
+Distribution: unstable
+Urgency: low
+Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
+Changed-By: Niels Thykier <niels@thykier.net>
+Description: 
+ lintian    - Debian package checker
+Closes: 662134 667895 669911 671387 673106 673109 673112 673198 673352 673449 673451 673611 673613 673862
+Changes: 
+ lintian (2.5.8) unstable; urgency=low
+ .
+   Its like 2.5.7, only with less false positives and no FTBFS.
+ .
+   * checks/binaries{,.desc}:
+     + [NT] Fix a too strict regex causing false-positives for
+       biarch packages.  This was a regression introduced in
+       version 2.5.7.  Thanks to Sven Joachim for reporting it.
+       (Closes: #673106)
+     + [NT] Demote certainty of hardening-no-stackprotector to
+       wild-guess and move it to debian/extra-hardening profile.
+     + [NT] Skip hardening-no-fortify-functions for binaries only
+       using the unprotected memcpy.  This greatly reduces the
+       number of false positives for binaries compiled with
+       gcc-4.7 -O2 (or higher optimization).  (Closes: #673112)
+   * checks/files:
+     + [NT] Properly handle symlinks in icon directories.  Thanks
+       to Nicholas Breen for the report and Felix Geyer for the
+       patches.  (Closes: #673352)
+     + [NT] Ignore wrong sizes on images in animations as it may
+       be a method to implement the animation.  Thanks to Matthias
+       Klumpp for the report and Felix Geyer for the patch.
+       (Closes: #673862)
+     + [NT] Ignore wrong icon sizes if the size difference is at
+       most 2px.  Thanks to Felix Geyer for the patch.
+   * checks/scripts:
+     + [NT] Refactor the %versioned_interpreters into a new
+       data file.
+   * checks/shared-libs:
+     + [NT] Fix false positive "dev-pkg-without-shlib-symlink"
+       for shared libraries using "libtool -release X.Y".
+       Thanks to Sven Joachim for the report.  (Closes: #673109)
+     + [NT] Fix false positive "dev-pkg-without-shlib-symlink"
+       for shared libraries installed in /lib.  Lintian now
+       correctly expects the dev-symlink beneath /usr/lib.
+       Thanks to Guillem Jover for the report.
+   * checks/source-copyright:
+     + [NT] Use the in-memory contents of the copyright file
+       instead of re-reading the file when parsing it as a
+       DEP-5 copyright file.
+ .
+   * collection/objdump-info{,.desc}:
+     + [NT] Drop -D flag for readelf when looking for symbols.
+       This makes some checks more reliable in Ubuntu.  Thanks
+       to Marc Deslauriers for the report and the patch.
+       (Closes: #673451)
+ .
+   * debian/control:
+     + [NT] Add versioned Build-Depends on dpkg-dev (>= 1.16.1~)
+       as the test suite relies on it.  Thanks to Luca Falavigna
+       for reporting it.
+     + [NT] Update the description to mention that the version
+       of Lintian is calibrated for version 3.9.3 of the Policy.
+   * debian/lintian.install:
+     + [NT] Remove usr/share/lintian/data - Lintian does not
+       need it and dpkg will not replace the dir with a symlink.
+ .
+   * data/scripts/interpreters:
+     + [NT] Add falcon, gbr3, jython and ngp2 as known interpreters.
+       (Closes: #669911, #671387, #662134, #667895)
+   * data/scripts/versioned-interpreters:
+     + [NT] New file.
+     + [NT] Added python2.7 to the list of known Python 2 interpreters.
+   * data/spelling/corrections:
+     + [RA] Remove corrections for "writeable" and "overwriteable".  These
+       spellings are permitted by the OED in UK English.  (Closes: #673611)
+     + [NT] Add correction for "pointer".
+ .
+   * lib/Lintian/Collect/*.pm:
+     + [NT] Localize "$_" to avoid truncating caller's variable.
+       (Closes: #673613)
+ .
+   * t:
+     + [NT] Generate empty ".so" files used in the test.  This
+       resolves an issue where dpkg-source would exclude them
+       causing a FTBFS.  (Closes: #673198)
+     + [NT] Fix test failure in derivatives where some hardening
+       flags are enabled by default.  Thanks to Marc Deslauriers
+       for the report and the patch.  (Closes: #673449)
+Checksums-Sha1: 
+ de2ae82463727f45b3d28dce15b89bbea8fc641c 2485 lintian_2.5.8.dsc
+ 576c06a94e7758e358a43b549b123052a7e49fdc 1092923 lintian_2.5.8.tar.gz
+ d6f247358c070a7e37c9f22c84aee63fbfd816fb 697324 lintian_2.5.8_all.deb
+Checksums-Sha256: 
+ 20fd9f4084197aaa923af9a7bb7dba8cc06bd1ed307a16c8b14e275d91e1093f 2485 lintian_2.5.8.dsc
+ b0a6016d9a0e5ba3ed1fc00cabd8b3be75c572fcfee7cd5079d06c64f626d343 1092923 lintian_2.5.8.tar.gz
+ 587c014c2f87ea1359f139e5a37bce1acd0b1552d7c49ca0e54e5e8b24f57c5c 697324 lintian_2.5.8_all.deb
+Files: 
+ 71653df24991d1734fea17f3205ef042 2485 devel optional lintian_2.5.8.dsc
+ 1121be8bcccaf75a571e4c17197bebbc 1092923 devel optional lintian_2.5.8.tar.gz
+ 4fd057457a01384ffdc4fa39888f4f4d 697324 devel optional lintian_2.5.8_all.deb
+
diff --git a/t/scripts/Lintian/Lab/data/changes/lintian_2.5.9_amd64.changes b/t/scripts/Lintian/Lab/data/changes/lintian_2.5.9_amd64.changes
new file mode 100644
index 0000000..e3e3b69
--- /dev/null
+++ b/t/scripts/Lintian/Lab/data/changes/lintian_2.5.9_amd64.changes
@@ -0,0 +1,101 @@
+Format: 1.8
+Date: Fri, 15 Jun 2012 21:29:03 +0200
+Source: lintian
+Binary: lintian
+Architecture: source all
+Version: 2.5.9
+Distribution: unstable
+Urgency: low
+Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
+Changed-By: Niels Thykier <niels@thykier.net>
+Description: 
+ lintian    - Debian package checker
+Closes: 675139 675358 675826 675832 676799 677142 677310 677649
+Changes: 
+ lintian (2.5.9) unstable; urgency=low
+ .
+   * Summary of tag changes:
+     + Added:
+       - run-parts-cron-filename-contains-illegal-chars
+     + Removed:
+       - run-parts-cron-filename-contains-full-stop
+ .
+   * checks/*:
+     + [NT] Migrate to new Lintian::Path API.
+   * checks/fields:
+     + [NT] Also classify lib*-cli-dev as belonging to the section
+       cli-mono (rather than libdevel).  Thanks to Chow Loong Jin
+       for the report and the patch.  (Closes: #675358)
+   * checks/files{,.desc}:
+     + [NT] Rename run-parts-cron-filename-contains-full-stop and
+       have it catch "+" in the filename as well.  Add reference
+       to policy 9.5.1 in the  tag description.
+   * checks/init.d:
+     + [NT] Use the proper regex for matching package names rather
+       than an ad-hoc regex.  Thanks to Thorsten Alteholz for the
+       report and suggested patch.  (Closes: #677142)
+   * checks/shared-libs:
+     + [NT] Reverse order of two subst expressions to prevent
+       dev-pkg-without-shlib-symlink false positives.  Thanks to
+       Aurelien Jarno, Yves-Alexis Perez and Stephen M. Webb for
+       the reports and the patch.
+       (Closes: #675826, #677310, #675832)
+     + [NT] Clarify that dev-pkg-without-shlib-symlink is emitted
+       on library and not "-dev" packages.
+ .
+   * collection/hardening-info:
+     + [NT] Process binaries with hardening-check via xargs.  This
+       greatly reduces the processing time for packages with many
+       binaries (like some of the linux binaries).  Thanks to
+       Bastian Blank for the heads up.
+     + [NT] Skip kernel modules (.ko files).
+   * collection/hardening-info-helper:
+     + [NT] New file.
+ .
+   * data/*:
+     + [NT] Refresh with tools/data from sid.
+   * data/scripts/interpreters:
+     + [NT] Replace ngp2 with ngraph.  Thanks to Koichi Akabe for
+       the report.  (Closes: #675139)
+   * data/spelling/corrections:
+     + [NT] Add corrections for usage, invocation(s) and ancient.
+ .
+   * debian/changelog:
+     + [NT] raster-image-in-scalable-directory was added in 2.5.7,
+       not removed.
+ .
+   * frontend/lintian{,-info}:
+     + [NT] Remove assumption that $ENV{HOME} is set/defined.  If
+       $ENV{HOME} is not sent, user specific profiles will simply
+       be ignored.
+   * frontend/lintian:
+     + [NT] Attempt to automatically determine what to process, if
+       no packages are given and debian/changelog exists.  Thanks
+       to Gilles Filippini for the suggestion.  (Closes: #676799)
+ .
+   * lib/Lintian/Check.pm:
+     + [NT] Add regex to match valid package names.
+   * lib/Lintian/Collect/Package.pm:
+     + [NT] sorted_index now returns a list rather than a list ref.
+     + [NT] Represent files (from index) as Lintian::Path objects.
+   * lib/Lintian/Collect/Source.pm:
+     + [NT] Recognise "Package-Type" as an alternative of the "X-"
+       field of same name.  Thanks to Christian Perrier for the
+       report.  (Closes: #677649)
+   * lib/Lintian/Data.pm:
+     + [NT] Gracefully handle the absence of $ENV{HOME}.
+   * lib/Lintian/Path.pm:
+     + [NT] New file.
+Checksums-Sha1: 
+ 5910ab721c5785b01400b3444cb9d6904ad6a876 2485 lintian_2.5.9.dsc
+ 0f0de9cbf56a6702509a95c2c976ca8f6bafef47 1100166 lintian_2.5.9.tar.gz
+ 40be3ed688b6d01c66bf9440fccefb5c32b189f3 702742 lintian_2.5.9_all.deb
+Checksums-Sha256: 
+ 9263501f00c3e3a762803375c8febc9cd651a34d4a3710f48e0d13266d3ead8d 2485 lintian_2.5.9.dsc
+ bd5c285d46ab54588819879e10e16d301542162cc886939c29ec2a4da05b7357 1100166 lintian_2.5.9.tar.gz
+ 6caf9ba0dd9b98713356d03818f844be36f4e58af44d14374ec1366631eb3a2a 702742 lintian_2.5.9_all.deb
+Files: 
+ 152a018943890d860377d5438d58f6fa 2485 devel optional lintian_2.5.9.dsc
+ d5abfd1dbca688d0bcaa90890052b758 1100166 devel optional lintian_2.5.9.tar.gz
+ 44934b36c0b11b01579cc4713772897c 702742 devel optional lintian_2.5.9_all.deb
+
diff --git a/t/scripts/Lintian/Lab/repair.t b/t/scripts/Lintian/Lab/repair.t
new file mode 100755
index 0000000..04b9dff
--- /dev/null
+++ b/t/scripts/Lintian/Lab/repair.t
@@ -0,0 +1,130 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+use Lintian::Lab;
+use Lintian::Lab::Manifest;
+use Lintian::Processable::Package;
+
+my $DATADIR = $0;
+$DATADIR =~ s,[^/]+$,,o;
+if ($DATADIR) {
+    # invokved in some other dir
+    $DATADIR = "$DATADIR/data";
+} else {
+    # current dir
+    $DATADIR = 'data';
+}
+
+plan skip_all => 'Data files not available'
+    unless -d $DATADIR;
+plan tests => 2;
+
+my $LAB_A = Lintian::Lab->new;
+my $LAB_B = Lintian::Lab->new;
+my $err = undef;
+eval {
+    $LAB_A->create ({ 'keep-lab' => 1});
+    $LAB_B->create ({ 'keep-lab' => 1});
+
+    subtest 'Lab test' => \&do_tests;
+};
+$err = $@ if $@;
+
+$LAB_A->remove if $LAB_A->exists;
+$LAB_B->remove if $LAB_B->exists;
+
+is ($err, undef, "Test had no errors");
+
+exit 0;
+
+sub do_tests {
+    # The grand scheme of things; import packages into Lab A.  Check
+    # that repair is "non-destructive" on a "good lab". Then close it;
+    # swap the manifests of Lab A and B.  Now they will both be wrong.
+    #
+    # Repair of A should result in the manifest being restored and repair
+    # of B should result in the Lab being empty.
+
+    my $full_manifest;
+    my $empty_manifest;
+    my $diff;
+    my $added = 0;
+
+    $LAB_A->open;
+
+    $empty_manifest = $LAB_A->_get_lab_index ('changes')->clone;
+
+    opendir my $dirfd, "$DATADIR/changes" or die "opendir $DATADIR/changes: $!";
+    foreach my $pkgbase (readdir $dirfd) {
+        next unless $pkgbase =~ m/\.(?:changes|u?deb|dsc)$/;
+        my $path = "$DATADIR/changes/$pkgbase";
+        my $proc = Lintian::Processable::Package->new ($path);
+        my $entry = $LAB_A->get_package ($proc);
+        $entry->create;
+        $added++;
+    }
+    closedir $dirfd;
+
+    $full_manifest = $LAB_A->_get_lab_index ('changes')->clone;
+
+    $LAB_A->close;
+
+    $diff = $empty_manifest->diff ($full_manifest);
+    cmp_ok (scalar @{ $diff->added }, '==', $added, 'Packages have been added to the lab');
+    $diff = undef;
+
+    # Test that repair is non-destructive on a "mint condition" lab.
+    $LAB_A->open;
+    $LAB_A->repair;
+
+    $diff = $full_manifest->diff ($LAB_A->_get_lab_index ('changes'));
+    cmp_ok (scalar @{ $diff->added }, '==', 0, 'Lab A (mint): new appeared with repair');
+    cmp_ok (scalar @{ $diff->removed }, '==', 0, 'Lab A (mint): Nothing disappeared with repair');
+    # Currently nothing changes (no pun intended) when repairing; it might in the
+    # future, but for now disallow it.
+    cmp_ok (scalar @{ $diff->changed }, '==', 0, 'Lab A (mint): Nothing changed with repair');
+
+    $LAB_A->close;
+    $diff = undef;
+
+    # Time for the swap
+
+    rename $LAB_A->dir . '/pool', $LAB_A->dir . '/pool-old' or die "rename LAB_A pool: $!";
+    rename $LAB_B->dir . '/pool', $LAB_A->dir . '/pool' or die "rename LAB_B -> LAB_A pool: $!";
+    rename $LAB_A->dir . '/pool-old', $LAB_B->dir . '/pool' or die "rename LAB_A -> LAB_B pool: $!";
+
+    # Test that repair restores entries that are available
+    $LAB_A->open;
+    $LAB_A->repair;
+
+    $diff = $full_manifest->diff ($LAB_A->_get_lab_index ('changes'));
+    cmp_ok (scalar @{ $diff->added }, '==', 0, 'Lab A (broken): Nothing new appeared with repair');
+    TODO: {
+        local $TODO = "Restoration not implemented yet";
+        cmp_ok (scalar @{ $diff->removed }, '==', 0, 'Lab A (broken): Nothing disappeared with repair');
+    }
+    # Currently nothing changes (no pun intended) when repairing; it might in the
+    # future, but for now disallow it.
+    cmp_ok (scalar @{ $diff->changed }, '==', 0, 'Lab A (broken): Nothing changed with repair');
+
+    $LAB_A->close;
+    $diff = undef;
+
+
+    # Test that repair prunes missing entries from the manifest
+    $LAB_B->open;
+    $LAB_B->repair;
+
+    $diff = $empty_manifest->diff ($LAB_B->_get_lab_index ('changes'));
+    cmp_ok (scalar @{ $diff->added }, '==', 0, 'Lab B: Nothing new appeared with repair');
+    cmp_ok (scalar @{ $diff->removed }, '==', 0, 'Lab B: Nothing disappeared with repair');
+    # Currently nothing changes (no pun intended) when repairing; it might in the
+    # future, but for now disallow it.
+    cmp_ok (scalar @{ $diff->changed }, '==', 0, 'Lab B: Nothing changed with repair');
+
+    $LAB_B->close;
+
+}

-- 
Debian package checker


Reply to: