[SCM] Debian package checker branch, master, updated. 2.5.1-25-ge286734

2011-06-29 Thread Niels Thykier
The following commit has been merged in the master branch:
commit e28673477be94fb646c896b735d48f5cf90866a0
Author: Niels Thykier ni...@thykier.net
Date:   Wed Jun 29 12:22:42 2011 +0200

Lintian::Command now supports appending to files

The new out_append/err_append can be used instead of out/err to
append the output to a file without of truncating the file first.

diff --git a/debian/changelog b/debian/changelog
index a29d857..0a58547 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -58,6 +58,10 @@ lintian (2.5.2) UNRELEASED; urgency=low
   loaded.  Previously Lintian would only load direct
   dependencies of a collection and assume that was enough.
 
+  * lib/Lintian/Command.pm:
++ [NT] Added support for appending output to files without
+  truncating them first via the new out_append and
+  err_append options.
   * lib/Lintian/{Internal/FrontendUtil,Profile}.pm:
 + [NT] New files.
   * lib/Lintian/{Tag/Info,Tags}.pm:
diff --git a/lib/Lintian/Command.pm b/lib/Lintian/Command.pm
index 5317a9b..8f88b41 100644
--- a/lib/Lintian/Command.pm
+++ b/lib/Lintian/Command.pm
@@ -98,6 +98,12 @@ STDOUT of the last forked child.  Will be set to a newly 
created
 scalar reference by default which can be used to retrieve the output
 after the call.
 
+=item out_append
+
+STDOUT of all forked childs, cannot be used with out and should only be
+used with files.  Unlike out, this appends the output to the file
+instread of truncating the file.
+
 =item pipe_out
 
 Use a pipe for STDOUT and start the process in the background.
@@ -108,6 +114,12 @@ process to end properly.
 
 STDERR of all forked childs.  Defaults to STDERR of the parent.
 
+=item err_append
+
+STDERR of all forked childs, cannot be used with err and should only be
+used with files.  Unlike err, this appends the output to the file
+instread of truncating the file.
+
 =item pipe_err
 
 Use a pipe for STDERR and start the process in the background.
@@ -170,15 +182,23 @@ sub spawn {
@out = ('pipe', $opts-{pipe_out});
$background = 1;
 } else {
-   $opts-{out} ||= \$out;
-   @out = ('', $opts-{out});
+   if (!exists $opts-{out}  defined $opts-{out_append}){
+   @out = ('', $opts-{out_append});
+   } else {
+   $opts-{out} ||= \$out;
+   @out = ('', $opts-{out});
+   }
 }
 if ($opts-{pipe_err}) {
@err = ('2pipe', $opts-{pipe_err});
$background = 1;
 } else {
-   $opts-{err} ||= \*STDERR;
-   @err = ('2', $opts-{err});
+   if (!exists $opts-{err}  defined $opts-{err_append}){
+   @err = ('2', $opts-{err_append});
+   } else {
+   $opts-{err} ||= \*STDERR;
+   @err = ('2', $opts-{err});
+   }
 }
 
 #use Data::Dumper;

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1qbrxe-0002ld...@vasks.debian.org



Re: Need some help with removing unpack-srcpkg-l1

2011-06-29 Thread Niels Thykier
On 2011-06-28 19:02, Russ Allbery wrote:
 Niels Thykier ni...@thykier.net writes:
 
 For this I was wondering if
 
   my $job = { err = 'index-errors', ... }
 
 appends the output to 'index-errors' or truncates the file before
 writing.
 
 It truncates currently.  Lintian::Command could be modified to make it
 append, though, which may not be a bad idea.  I think all one would have
 to do is change 2 to 2.
 

That was easy to do - I decided to implement this by using a new option
for it instead of changing the behaviour of out/err.  Makes life less
interesting. :)

 Alternatively, would we rather want cruft to handle multiple index-error
 files (one for each tarball)?
 
 I'm not sure it's worth the effort.  Errors there happen rarely.
 

I was not sure either, but I wanted to mention a possible alternative.

 Secondly, if I understand the situation correctly, I believe the version
 of collection/index.desc should be updated with this change (to ensure
 the index are re-generated).  But since file-info generates its output
 from the index file, file-info should be re-run as well.
   Unfortunately, if I understand frontend/lintian correctly this will
 not happen automatically.  Since file-info succeeded in the past, there
 should already be a .file-info-1 file in the lab and the update of
 index will not make frontend/lintian remove that (or have I missed
 something?).
 
 I think that's correct.  Collection scripts should probably check the
 version placeholders of all their dependencies as well, but I don't think
 they currently do that.
 

Personally I sort of figured our make-shift resolver ought to deal with
that.  Especially since the collections are being run in parallel.

~Niels


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4e0afdf2.9000...@thykier.net



[Patch] Replaced-unpack-srcpkg-l1-with-an-extended-coll-index

2011-06-29 Thread Niels Thykier
Hi

Attached is a patch I believe just that, but as you may have guessed I
would like a bit of peer review before I push it.  As a side-effect of
this patch, I have made the indexing support multiple tarballs.
  My greatest concern are the changes to collection/index; the rest of
them I feel are more or less straight forward.

I have not been able to fix a multi tarball source package into our test
suite as I believe it still lacks this support as well.  As test case I
used [1] and checked the index + file-info[2] file in the lab.

Thanks for considering,
~Niels

[1]
http://people.debian.org/~nthykier/lintian-tests/libcgi-application-basic-plugin-bundle-perl_0.5-1.dsc

[2] If the index file contains errors, the file-info will have a lot of
file-not-found errors.

From 2f2b0015ee5671fa45eb9d5e6b3c8fb3490f5b1a Mon Sep 17 00:00:00 2001
From: Niels Thykier ni...@thykier.net
Date: Tue, 28 Jun 2011 11:55:52 +0200
Subject: [PATCH] Replaced unpack-srcpkg-l1 with an extended coll/index

Moved the indexing code from unpack-srcpkg-l1 to coll/index with
a few changes to handle multiple orig-tarballs.

Note: Symlink of source pkg parts has been moved to Lab::Package for
when it creates the entry.  Creating a separate coll for that seemed
like overkill.
---
 collection/index|  214 ---
 collection/index.desc   |7 +-
 lib/Lab/Package.pm  |   85 ++-
 unpack/unpack-srcpkg-l1 |  163 ---
 4 files changed, 212 insertions(+), 257 deletions(-)
 delete mode 100755 unpack/unpack-srcpkg-l1

diff --git a/collection/index b/collection/index
index eedc12a..00f8263 100755
--- a/collection/index
+++ b/collection/index
@@ -29,6 +29,8 @@ use vars qw($verbose);
 
 # import perl libraries
 use lib $ENV{'LINTIAN_ROOT'}/lib;
+use Cwd();
+use File::Spec;
 use Util;
 use Lintian::Command qw(spawn reap);
 
@@ -36,37 +38,189 @@ use Lintian::Command qw(spawn reap);
 my $pkg = shift;
 my $type = shift;
 
-my (@jobs, $job);
+unlink 'index' or fail Could not unlink index: $! if -e 'index'  -s 'index';
+unlink 'index-errors' or fail Could not unlink index-errors: $! if -e 'index-errors'  -s 'index-errors';
 
-foreach my $file qw(index index-errors index-owner-id) {
-unlink $file or fail $file: $! if -f $file;
+if ($type ne 'source') {
+index_deb();
+} else {
+index_src();
 }
 
-$job = { fail = 'error',
- out  = 'index',
- err  = 'index-errors' };
-push @jobs, $job;
-# (replaces dpkg-deb -c)
-# create index file for package
-spawn($job,
-  ['dpkg-deb', '--fsys-tarfile', 'deb' ],
-  '|', ['tar', 'tfv', '-'],
-  '|', ['sed', '-e', 's/^h/-/'],
-  '|', ['sort', '-k', '6'], '');
-
-$job = { fail = 'error',
- out  = 'index-owner-id',
- err  = '/dev/null' };
-push @jobs, $job;
-# (replaces dpkg-deb -c)
-# create index file for package with owner IDs instead of names
-spawn($job,
-  ['dpkg-deb', '--fsys-tarfile', 'deb' ],
-  '|', ['tar', '--numeric-owner', '-tvf', '-'],
-  '|', ['sed', '-e', 's/^h/-/'],
-  '|', ['sort', '-k', '6'], '');
-
-reap(@jobs);
-undef @jobs;
-
 exit 0;
+
+# returns all (orig) tarballs.
+sub gather_tarballs {
+my $file = Cwd::realpath('dsc');
+my $dir;
+my $data;
+my $version;
+my @tarballs;
+my $base;
+my $baserev;
+fail Cannot resolve \dsc\ link for $pkg or it does not point to a file.\n unless $file and -e $file;
+(undef, $dir, undef) = File::Spec-splitpath($file);
+$data = get_dsc_info($file) or fail Could not parse dsc file for $pkg.\n;
+#  Version handling is based on Dpkg::Version::parseversion.
+$version = $data-{'version'};
+if ($version =~ /:/) {
+$version =~ s/^(?:\d+):(.+)/$1/ or fail(bad version number '$version');
+}
+$baserev = $data-{'source'} . '_' . $version;
+$version =~ s/(.+)-(.*)$/$1/;
+$base = $data-{'source'} . '_' . $version;
+for my $fs (split(/\n/,$data-{'files'})) {
+$fs =~ s/^\s*//;
+next if $fs eq '';
+my @t = split(/\s+/o,$fs);
+next if ($t[2] =~ m,/,);
+# Look for $pkg_$version.orig(-$comp)?.tar.$ext (non-native)
+#   or $pkg_$version.tar.$ext (native)
+#  - This deliberately does not look for the debian packaging
+#even when this would be a tarball.
+if ($t[2] =~ /^(?:\Q$base\E\.orig(?:-(.*))?|\Q$baserev\E)\.tar\.(?:gz|bz2|lzma|xz)$/) {
+push @tarballs, [$t[2], $1//''];
+}
+}
+fail('could not find the source tarball') unless @tarballs;
+return @tarballs;
+}
+
+# Creates an index for the source package
+sub index_src {
+my @tarballs = gather_tarballs();
+my @result;
+foreach my $tardata (@tarballs) {
+	my ($tarball, $compname) = @$tardata;
+	my @index;
+# Collect a list of the files in the source package.  tar currently doesn't
+# automatically recognize LZMA / XZ, so we need to add the option where it's
+   

Bug#632115: lintian: internal error when checking two binaries with same name and version

2011-06-29 Thread Jakub Wilk

Package: lintian
Version: 2.5.1
Severity: minor

$ lintian unbound_1.4.10-1_i386.deb unbound_1.4.10-1_amd64.deb
W: unbound: binary-without-manpage usr/sbin/unbound-control-setup
W: unbound: manpage-has-bad-whatis-entry usr/share/man/man5/unbound.conf.5.gz
W: unbound: manpage-has-errors-from-man usr/share/man/man5/unbound.conf.5.gz  
1: can't cd to unpacked/usr/share/man
W: unbound: manpage-has-bad-whatis-entry usr/share/man/man8/unbound-anchor.8.gz
W: unbound: manpage-has-errors-from-man usr/share/man/man8/unbound-anchor.8.gz  
1: can't cd to unpacked/usr/share/man
W: unbound: manpage-has-bad-whatis-entry 
usr/share/man/man8/unbound-checkconf.8.gz
W: unbound: manpage-has-errors-from-man 
usr/share/man/man8/unbound-checkconf.8.gz  1: can't cd to unpacked/usr/share/man
W: unbound: manpage-has-bad-whatis-entry usr/share/man/man8/unbound-control.8.gz
W: unbound: manpage-has-errors-from-man usr/share/man/man8/unbound-control.8.gz 
 1: can't cd to unpacked/usr/share/man
W: unbound: manpage-has-bad-whatis-entry usr/share/man/man8/unbound.8.gz
W: unbound: manpage-has-errors-from-man usr/share/man/man8/unbound.8.gz  1: 
can't cd to unpacked/usr/share/man
W: unbound: binary-without-manpage usr/sbin/unbound-control-setup
internal error: cannot open unpacked/etc/init.d/unbound: No such file or 
directory
internal error: cannot run scripts check on package unbound
warning: skipping check of binary package unbound


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.39-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lintian depends on:
ii  binutils  2.21.52.20110606-2 The GNU assembler, linker and bina
ii  bzip2 1.0.5-6high-quality block-sorting file co
ii  diffstat  1.54-1 produces graph of changes introduc
ii  file  5.04-6+b1  Determines file type using magic
ii  gettext   0.18.1.1-3 GNU Internationalization utilities
ii  intltool-debian   0.35.0+20060710.1  Help i18n of RFC822 compliant conf
ii  libapt-pkg-perl   0.1.24+b2  Perl interface to libapt-pkg
ii  libclass-accessor-per 0.34-1 Perl module that automatically gen
ii  libdpkg-perl  1.16.0.3   Dpkg perl modules
ii  libemail-valid-perl   0.184-1Perl module for checking the valid
ii  libipc-run-perl   0.89-1 Perl module for running processes
ii  libparse-debianchange 1.2.0-1parse Debian changelogs and output
ii  libtimedate-perl  1.2000-1   collection of modules to manipulat
ii  liburi-perl   1.58-1 module to manipulate and access UR
ii  locales   2.13-7 Embedded GNU C Library: National L
ii  man-db2.6.0.2-1  on-line manual pager
ii  perl [libdigest-sha-p 5.12.3-7+b1Larry Wall's Practical Extraction 
ii  unzip 6.0-4  De-archiver for .zip files


Versions of packages lintian suggests:
pn  binutils-mult none (no description available)
ii  dpkg-dev  1.16.0.3   Debian package development tools
ii  libhtml-parse 3.68-1+b1  collection of modules that parse H
pn  libtext-templ none (no description available)
ii  man-db2.6.0.2-1  on-line manual pager
ii  xz-utils  5.1.1alpha+20110528-1~exp1 XZ-format compression utilities

--
Jakub Wilk



--
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110629172259.ga1...@jwilk.net



Bug#632159: lintian: [spelling-error-in-description] discontiguous noncontiguous: not a spelling error ?

2011-06-29 Thread Charles Plessy
Package: lintian
Version: 2.5.1
Severity: minor

Dear lintian maintainers,

I question that discontiguous is a spelling error of noncontiguous.

In the case of the last-align package, if I search the web with the
word in its context, discontiguous suffix array, I find serveral
hits that are not derived from the package's description or Upstream
material.  In contrary, non-contiguous suffix array and
noncontiguous suffix array return nothing.  “discontiguous” has an
entry in several dictionnaries.  I suggest to remove it from the list
of spelling errors.

Have a nice day,

-- 
Charles Plessy
Tsurumi, Kanagawa, Japan



--
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20110630043818.12686.26987.reportbug@localhost.localdomain