[SCM] Debian package checker branch, master, updated. 2.2.17-15-g1228185

2009-10-31 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit c5e27407eb11909c605136afd8419e9b44049b3a
Author: Frank Lichtenheld dj...@debian.org
Date:   Sat Oct 31 09:47:53 2009 +0100

copyright-file: special case perl in no-copyright-file check

* checks/copyright-file:
  + [FL] Add special exception to no-copyright-file for perl.
See #522827 for discussion.  (Closes: #553262)

diff --git a/checks/copyright-file b/checks/copyright-file
index 11ab2d8..a776ee8 100644
--- a/checks/copyright-file
+++ b/checks/copyright-file
@@ -130,7 +130,9 @@ foreach (sort keys %{$info-index}) {
 }
 
 if (not $found) {
-tag no-copyright-file, ;
+# #522827: special exception for perl for now
+tag no-copyright-file, 
+  unless $pkg eq 'perl';
 }
 
 # check that copyright is UTF-8 encoded
diff --git a/debian/changelog b/debian/changelog
index 0842ee0..792de74 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,9 @@ lintian (2.2.18) UNRELEASED; urgency=low
 + [ADB] Fix an uninitialised value warning when processing a
   -dev package which has no Depends: fields.  Thanks, Lucas
   Nussbaum.
+  * checks/copyright-file:
++ [FL] Add special exception to no-copyright-file for perl.
+  See #522827 for discussion.  (Closes: #553262)
   * checks/cruft:
 + [FL] Add automake1.11 to list of autotools packages.  Thanks,
   Laurent Bigonville.  (Closes: #551051)

-- 
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



[SCM] Debian package checker branch, master, updated. 2.2.17-15-g1228185

2009-10-31 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 4584434e2dee868703e29ba68a3fa34e10e24277
Author: Frank Lichtenheld dj...@debian.org
Date:   Sat Oct 31 10:41:07 2009 +0100

Make changelog-file more robust in terms of Perl warnings

The only package I know which causes this is Perl itself, because
it has such a weird setup that it gets lintian completly confused
and trying to parse the upstream changelog file, which of course
fails horribly.

diff --git a/checks/changelog-file b/checks/changelog-file
index 73f6036..4d5eb82 100644
--- a/checks/changelog-file
+++ b/checks/changelog-file
@@ -305,11 +305,11 @@ if (@entries) {
 
 # Some checks should only be done against the most recent changelog entry.
 my $entry = $entries[0];
-if (@entries == 1 and $entry-Version =~ /-1$/) {
+if (@entries == 1 and $entry-Version and $entry-Version =~ /-1$/) {
 tag 'new-package-should-close-itp-bug'
 unless @{ $entry-Closes };
 }
-my $changes = $entry-Changes;
+my $changes = $entry-Changes || '';
 while ($changes =~ /(closes\s*(?:bug)?\#?\s?\d{6,})[^\w]/ig) {
tag possible-missing-colon-in-closes, $1 if $1;
 }
@@ -326,9 +326,13 @@ if (@entries) {
 # that was already there.
 my $version;
 if ($info-native) {
-$version = $entry-Version;
+$version = $entry-Version || '';
 } else {
+  if( $entry-Version ){
 ($version) = (split('-', $entry-Version))[-1];
+  }else{
+   $version = '';
+  }
 }
 unless (not $info-native and $version =~ /\./) {
 if ($info-native and $version =~ /testing|(?:un)?stable/i) {
diff --git a/debian/changelog b/debian/changelog
index 792de74..5b4c1d4 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
 lintian (2.2.18) UNRELEASED; urgency=low
 
+  * checks/changelog-file:
++ [FL] Avoid various Perl warnings which can be caused by
+  completly broken changelog files.
   * checks/control-file{,.desc}:
 + [RA] Say to use (= ${binary:Version}) to fix weak dependencies
   between a library dev package and the shared library.  Thanks,

-- 
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



[SCM] Debian package checker branch, master, updated. 2.2.17-15-g1228185

2009-10-31 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit dbb7c5a9888bfcfb72616b33afab0811c9fc24f2
Author: Frank Lichtenheld dj...@debian.org
Date:   Sat Oct 31 11:06:55 2009 +0100

Missing executable flag on debian/rules in test menu-format-desktop-general

diff --git a/t/tests/menu-format-desktop-general/debian/debian/rules 
b/t/tests/menu-format-desktop-general/debian/debian/rules
old mode 100644
new mode 100755

-- 
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



[SCM] Debian package checker branch, master, updated. 2.2.17-15-g1228185

2009-10-31 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 78e4c50b8730f5fa6e81925ec467f12b3a0d41cc
Author: Frank Lichtenheld dj...@debian.org
Date:   Sat Oct 31 11:13:13 2009 +0100

Add 3.0 (quilt) and 3.0 (native) to list of supported source formats

* checks/fields:
  + [FL] Allow source formats 3.0 (quilt) and 3.0 (native).
(Closes: #552707)

diff --git a/checks/fields b/checks/fields
index a337dfe..fc118a5 100644
--- a/checks/fields
+++ b/checks/fields
@@ -76,6 +76,9 @@ our %known_obsolete_fields = map { $_ = 1 }
 ('revision', 'package-revision', 'package_revision',
  'recommended', 'optional', 'class');
 
+our @supported_source_formats =
+  ( qr/1\.0/, qr/3\.0\s*\((quilt|native)\)/ );
+
 our %known_build_essential = map { $_ = 1 }
 ('libc6-dev', 'libc-dev', 'gcc', 'g++', 'make', 'dpkg-dev');
 
@@ -161,8 +164,15 @@ unless (-d fields) {
 
 if ($type eq 'source') {
my $format = $info-field('format');
-   if (defined($format) and $format !~ /^\s*1\.0\s*\z/) {
-   tag 'unsupported-source-format', $format;
+   if (defined($format)) {
+   my $supported = 0;
+   foreach my $f (@supported_source_formats){
+   if( $format =~ /^\s*$f\s*\z/ ){
+   $supported = 1;
+   }
+   }
+   tag 'unsupported-source-format', $format
+   unless $supported;
}
 }
 
diff --git a/debian/changelog b/debian/changelog
index 5b4c1d4..3e23849 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,8 @@ lintian (2.2.18) UNRELEASED; urgency=low
   * checks/fields:
 + [RA] Fix lib-recommends-documentation tag to correctly exclude dev
   and doc packages.  Patch from Stéphane Glondu.  (Closes: #548210)
++ [FL] Allow source formats 3.0 (quilt) and 3.0 (native).
+  (Closes: #552707)
   * checks/lintian.desc:
 + [CW] Add lucid as an allowable distribution for Ubuntu, and remove
   gutsy.

-- 
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



[SCM] Debian package checker branch, master, updated. 2.2.17-15-g1228185

2009-10-31 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 16c5235770f9a9cb9aaea6fe6cb660533e82edaa
Author: Salvatore Bonaccorso salvatore.bonacco...@gmail.com
Date:   Sat Oct 31 11:20:45 2009 +0100

Fix some false positives of copyright-refers-to-symlink-license

* checks/copyright-file:
  + [FL] Extend match for exceptions to copyright-refers-to-symlink-license
to catch more ways to specify Perl's license.  Patch from
Salvatore Bonaccorso.  (Closes: #549596)

diff --git a/checks/copyright-file b/checks/copyright-file
index a776ee8..293f9f0 100644
--- a/checks/copyright-file
+++ b/checks/copyright-file
@@ -163,7 +163,9 @@ if 
(m,(usr/share/common-licenses/(?:GPL|LGPL|BSD|Artistic)\.gz),) {
 # our false positives for GPL references that don't include a specific version
 # number, but it will get the obvious ones.
 if (m,(usr/share/common-licenses/(L?GPL|GFDL))([^-]),i  !m,as Perl itself,i
- !m,License-Alias:\s+Perl,) {
+ !m,License-Alias:\s+Perl,
+ !m,License:\s+Artistic\s+or\s+GPL-1\+,
+ !m,License:\s+Perl,) {
 my ($ref, $license, $separator) = ($1, $2, $3);
 if ($separator =~ /[\d\w]/) {
tag 'copyright-refers-to-nonexistent-license-file', $ref$separator;
diff --git a/debian/changelog b/debian/changelog
index 3e23849..17626f5 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,9 @@ lintian (2.2.18) UNRELEASED; urgency=low
   * checks/copyright-file:
 + [FL] Add special exception to no-copyright-file for perl.
   See #522827 for discussion.  (Closes: #553262)
++ [FL] Extend match for exceptions to copyright-refers-to-symlink-license
+  to catch more ways to specify Perl's license.  Patch from
+  Salvatore Bonaccorso.  (Closes: #549596)
   * checks/cruft:
 + [FL] Add automake1.11 to list of autotools packages.  Thanks,
   Laurent Bigonville.  (Closes: #551051)

-- 
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



[SCM] Debian package checker branch, master, updated. 2.2.17-15-g1228185

2009-10-31 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 1228185e8721c619de72abcf3439532f0c1463ce
Author: Frank Lichtenheld dj...@debian.org
Date:   Sat Oct 31 11:24:34 2009 +0100

Drop unsupported-source-format from quilt test package

diff --git a/t/tests/cruft-general-quilt/desc b/t/tests/cruft-general-quilt/desc
index 07e6a39..0d99b05 100644
--- a/t/tests/cruft-general-quilt/desc
+++ b/t/tests/cruft-general-quilt/desc
@@ -21,4 +21,3 @@ Test-For:
  diff-contains-svn-commit-file
  diff-contains-svn-conflict-file
  diff-contains-svn-control-dir
- unsupported-source-format
diff --git a/t/tests/cruft-general-quilt/tags b/t/tests/cruft-general-quilt/tags
index 8172cbc..c5fb443 100644
--- a/t/tests/cruft-general-quilt/tags
+++ b/t/tests/cruft-general-quilt/tags
@@ -1,5 +1,4 @@
 E: cruft-general-quilt source: debian-files-list-in-source
-E: cruft-general-quilt source: unsupported-source-format 3.0 (quilt)
 W: cruft-general-quilt source: diff-contains-arch-control-dir debian/{arch}
 W: cruft-general-quilt source: diff-contains-arch-inventory-file 
debian/.arch-inventory
 W: cruft-general-quilt source: diff-contains-bts-control-dir debian/.be

-- 
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



[RFC] Drop unusual-interpreter?

2009-10-31 Thread Frank Lichtenheld
Hi.

I think we should consider dropping the unusual-interpreter tag.
I don't think it scales with the archive getting bigger and bigger
and more interpreters showing up.

We still should do the other checks for known interpreters, but
just not complain about unusual ones.

According to lintian.d.o, which is very current right now, the
stats for the tag are: 19 packages, 33 tags, plus 178 overrides

Gruesse,
-- 
Frank Lichtenheld dj...@debian.org
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Upload soon

2009-10-31 Thread Frank Lichtenheld
Hi.

I will do an upload later today or tomorrow to get the
unsupported-source-format fixed and to get the perl
exception for no-copyright-file done.

If anyone has any more changes he would like to see in
the upload than are currently committed, please speak up.

Gruesse,
-- 
Frank Lichtenheld dj...@debian.org
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: [RFC] Drop unusual-interpreter?

2009-10-31 Thread Frank Lichtenheld
On Sat, Oct 31, 2009 at 09:43:20AM -0700, Russ Allbery wrote:
 Frank Lichtenheld dj...@debian.org writes:
  I think we should consider dropping the unusual-interpreter tag.  I
  don't think it scales with the archive getting bigger and bigger and
  more interpreters showing up.
 
  We still should do the other checks for known interpreters, but
  just not complain about unusual ones.
 
  According to lintian.d.o, which is very current right now, the
  stats for the tag are: 19 packages, 33 tags, plus 178 overrides
 
 Hm, I do periodically go through the lintian.d.o report and add new
 interpreters, although I've been busy lately, and I think the ability to
 catch typos is very useful.  Without that tag, there's no notice that
 /usr/bin/pelr is a bug.
 
 Last time I checked, a lot of the overrides were things that we could fix
 easily, although I haven't looked recently.

Ok, if you think there is value in this check we can certainly keep it.
I might stop adding new interpreters myself, though (not that anyone
might notice that, given my level of contributions this year ;)).

Gruesse,
-- 
Frank Lichtenheld dj...@debian.org
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#553493: lintian: usr-share-doc-symlink-without-dependency doesn't find indirect dependency

2009-10-31 Thread Frank Lichtenheld
On Sat, Oct 31, 2009 at 07:43:14PM +0100, Ove Kaaven wrote:
 E: wine-bin-unstable: usr-share-doc-symlink-without-dependency 
 libwine-unstable
 E: wine-unstable: usr-share-doc-symlink-without-dependency libwine-unstable
 
 But wine-unstable has a versioned dependency on wine-bin-unstable,
 and wine-bin-unstable has a versioned dependency on libwine-bin-unstable,
 and libwine-bin-unstable has a versioned dependency on libwine-unstable.
 (All of these dependencies are, of course, strict equals relations.)
 
 Hence, I *do* depend on the package providing /usr/share/doc, just
 indirectly. Is it really necessary to change the wine packaging, or could
 lintian be fixed to not complain about this?

I don't think that lintian can be fixed to detect that, since it has only the
dependency information of the current package available. What it currently does
to search for a dependency on the package name that the symlink points to.

I see basically three choices here:

1) replicate the dependency cascade with a symlink cascade, but I think
   nobody would be helped with that, so I would advocate against this.
2) just add an override
3) actually add a dependency on the package you depend on to provide the
   copyright file

I would recommend to do 3, it is probably not at all difficult or time
consuming and documents a direct dependency that actually exists. Relying on
indirect dependencies is usually discouraged, even though of course in a
purely internal dependency chain it is not a problem per se.

Gruesse,
-- 
Frank Lichtenheld dj...@debian.org
www: http://www.djpig.de/



-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] Debian package checker branch, master, updated. 2.2.17-17-ga1c7bb2

2009-10-31 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit c6c9504a50902518f86aa84f07e2fd7fd5a54fd9
Author: Frank Lichtenheld dj...@debian.org
Date:   Sat Oct 31 23:19:53 2009 +0100

template-uses-unsplit-choices should not be experimental anymore

* checks/debconf.desc:
  + [FL] Remove experimental flag from template-uses-unsplit-choices.
This was only done to not disrupt the lenny freeze.  Thanks,
Raphael Geissert.  (Closes: #553487)

diff --git a/checks/debconf.desc b/checks/debconf.desc
index cfab964..072cdd3 100644
--- a/checks/debconf.desc
+++ b/checks/debconf.desc
@@ -316,7 +316,6 @@ Ref: debconf-devel(7)
 Tag: template-uses-unsplit-choices
 Severity: normal
 Certainty: possible
-Experimental: yes
 Info: The use of _Choices in templates is deprecated.
  An _Choices field must be translated as a single string.
  .
diff --git a/debian/changelog b/debian/changelog
index 17626f5..9201736 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,10 @@ lintian (2.2.18) UNRELEASED; urgency=low
   * checks/cruft:
 + [FL] Add automake1.11 to list of autotools packages.  Thanks,
   Laurent Bigonville.  (Closes: #551051)
+  * checks/debconf.desc:
++ [FL] Remove experimental flag from template-uses-unsplit-choices.
+  This was only done to not disrupt the lenny freeze.  Thanks,
+  Raphael Geissert.  (Closes: #553487)
   * checks/fields:
 + [RA] Fix lib-recommends-documentation tag to correctly exclude dev
   and doc packages.  Patch from Stéphane Glondu.  (Closes: #548210)
@@ -42,7 +46,7 @@ lintian (2.2.18) UNRELEASED; urgency=low
 + [FL] Update from doc-base 0.9.5. Adds Typesetting section.
   Thanks Julian Gilbey.  (Closes: #552526)
 
- -- Frank Lichtenheld dj...@debian.org  Tue, 27 Oct 2009 17:58:23 +0100
+ -- Frank Lichtenheld dj...@debian.org  Sat, 31 Oct 2009 23:17:02 +0100
 
 lintian (2.2.17) unstable; urgency=medium
 
diff --git a/testset/tags.debconf b/testset/tags.debconf
index 7ae42ec..ad13cc1 100644
--- a/testset/tags.debconf
+++ b/testset/tags.debconf
@@ -37,6 +37,7 @@ W: debconf source: newer-debconf-templates
 W: debconf source: package-uses-deprecated-debhelper-compat-version 4
 W: debconf source: patch-system-but-no-source-readme
 W: debconf source: stray-translated-debconf-templates debconf-test.templates.de
+W: debconf source: template-uses-unsplit-choices debconf-test - 
debconf/testmulti-escape
 W: debconf source: translated-default-field debconf-test.templates: 67
 W: debconf source: translated-default-field debconf-test.templates: 72
 W: debconf source: unknown-encoding-in-po-file debian/po/fr.po
@@ -69,4 +70,3 @@ W: debconf-test: using-imperative-form-in-templates 
debconf/1st-person
 W: debconf-test: using-imperative-form-in-templates debconf/should-be-boolean
 W: debconf-test: using-question-in-extended-description-in-templates 
debconf/testboolean
 W: debconf-udeb udeb: missing-debconf-dependency
-X: debconf source: template-uses-unsplit-choices debconf-test - 
debconf/testmulti-escape

-- 
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



[SCM] Debian package checker branch, master, updated. 2.2.17-17-ga1c7bb2

2009-10-31 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit a1c7bb2fc7bec323be1aec4fa39ceb5f55d08b16
Author: Frank Lichtenheld dj...@debian.org
Date:   Sat Oct 31 23:38:37 2009 +0100

More unsupported-source-format removals

diff --git a/t/source/unpack-srcpkg-lzma/tags b/t/source/unpack-srcpkg-lzma/tags
index c88fc4a..e69de29 100644
--- a/t/source/unpack-srcpkg-lzma/tags
+++ b/t/source/unpack-srcpkg-lzma/tags
@@ -1 +0,0 @@
-E: unpack-srcpkg-lzma source: unsupported-source-format 3.0 (quilt)

-- 
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



[SCM] Debian package checker branch, master, updated. 2.2.17-7-gfc967eb

2009-10-27 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 3e40aa4f70b478e5314cb8ed1e9fd8373d6cc222
Author: Frank Lichtenheld dj...@debian.org
Date:   Tue Oct 27 17:32:28 2009 +0100

Update list of doc-base sections. Add Typesetting

* data/doc-base/sections:
  + [FL] Update from doc-base 0.9.5. Adds Typesetting section.
Thanks Julian Gilbey.  (Closes: #552526)

diff --git a/data/doc-base/sections b/data/doc-base/sections
index 41ef102..8d74588 100644
--- a/data/doc-base/sections
+++ b/data/doc-base/sections
@@ -1,6 +1,6 @@
 # Taken from /usr/share/doc-base/data/sections.list.
 #
-# Last synchronized with doc-base 0.8.16 (2008-05-14).
+# Last synchronized with doc-base 0.9.5 (2009-10-27).
 
 Accessibility
 Amateur Radio
@@ -68,6 +68,7 @@ System/Security
 Terminal Emulators
 Text
 TV and Radio
+Typesetting
 Viewers
 Video
 Web Development
diff --git a/debian/changelog b/debian/changelog
index 8514b8b..204b322 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,7 +11,11 @@ lintian (2.2.18) UNRELEASED; urgency=low
 + [RA] Add some more details to executable-not-elf-or-script about
   possible causes and how to correct them.
 
- -- Russ Allbery r...@debian.org  Fri, 25 Sep 2009 17:29:38 -0700
+  * data/doc-base/sections:
++ [FL] Update from doc-base 0.9.5. Adds Typesetting section.
+  Thanks Julian Gilbey.  (Closes: #552526)
+
+ -- Frank Lichtenheld dj...@debian.org  Tue, 27 Oct 2009 17:29:39 +0100
 
 lintian (2.2.17) unstable; urgency=medium
 

-- 
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



[SCM] Debian package checker branch, master, updated. 2.2.17-7-gfc967eb

2009-10-27 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit fc967eba12615b7df666dfd792caad2696578526
Author: Frank Lichtenheld dj...@debian.org
Date:   Tue Oct 27 18:00:36 2009 +0100

Also exclude newer Python's dist-packages in incorrect-libdir-in-la-file

* checks/shared-libs:
  + [FL] Add /usr/lib/python*/dist-packages to exception list for
incorrect-libdir-in-la-file.  Thanks, Mathieu Trudel.
(Closes: #551134)

diff --git a/checks/shared-libs b/checks/shared-libs
index 7418f9e..b7727db 100644
--- a/checks/shared-libs
+++ b/checks/shared-libs
@@ -172,7 +172,7 @@ for my $cur_file (sort keys %{$info-index}) {
 
# python-central is a special case since the libraries are moved
# at install time.
-   next if ($actual =~ m,^/usr/lib/python[\d.]+/site-packages,
+   next if ($actual =~ m,^/usr/lib/python[\d.]+/(?:site|dist)-packages,
 and $expected =~ m,^/usr/share/pyshared,);
tag incorrect-libdir-in-la-file, $cur_file, $actual != $expected
unless($expected eq $actual);
diff --git a/debian/changelog b/debian/changelog
index d6fa6c4..9fd5501 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,12 +13,16 @@ lintian (2.2.18) UNRELEASED; urgency=low
   * checks/scripts.desc:
 + [RA] Add some more details to executable-not-elf-or-script about
   possible causes and how to correct them.
+  * checks/shared-libs:
++ [FL] Add /usr/lib/python*/dist-packages to exception list for
+  incorrect-libdir-in-la-file.  Thanks, Mathieu Trudel.
+  (Closes: #551134)
 
   * data/doc-base/sections:
 + [FL] Update from doc-base 0.9.5. Adds Typesetting section.
   Thanks Julian Gilbey.  (Closes: #552526)
 
- -- Frank Lichtenheld dj...@debian.org  Tue, 27 Oct 2009 17:42:49 +0100
+ -- Frank Lichtenheld dj...@debian.org  Tue, 27 Oct 2009 17:58:23 +0100
 
 lintian (2.2.17) unstable; urgency=medium
 

-- 
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



Re: Updating lintian.d.o?

2009-10-27 Thread Frank Lichtenheld
On Thu, Oct 22, 2009 at 01:58:33PM -0500, Raphael Geissert wrote:
 Could anyone belonging to the lintian group (according to LDAP: Marc, Josip,
 Frank, Jeroen, Colin and Russ, but Russ is in VAC) please update
 lintian.d.o to the latest version?
 
 There are some checks that would be great to see it on the website so that
 other tools can report them.

I've updated the lintian.d.o code to 2.2.17 and started a full rerun.

Gruesse,
-- 
Frank Lichtenheld dj...@debian.org
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] Debian package checker branch, master, updated. 2.2.13-2-g7f86611

2009-07-13 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 1a41bbce5a012269abc63ffb0a43e88ca6c6651e
Author: Frank Lichtenheld dj...@debian.org
Date:   Sun Jul 12 13:01:13 2009 +0200

packages named lib*-camlp4-dev should be in section ocaml

diff --git a/checks/fields b/checks/fields
index 98afb77..6235b7b 100644
--- a/checks/fields
+++ b/checks/fields
@@ -209,7 +209,7 @@ my @NAME_SECTION_MAPPINGS = (
 [ qr/^(?:lib)php-/   = 'php'  ],
 [ qr/^lib(?:hugs|ghc6)-/ = 'haskell'  ],
 [ qr/^lib.*-ruby(?:1\.\d)?$/ = 'ruby' ],
-[ qr/^lib.*-ocaml-dev$/  = 'ocaml'],
+[ qr/^lib.*-(?:ocaml|camlp4)-dev$/ = 'ocaml' ],
 [ qr/^lib.*-dev$/= 'libdevel' ],
 );
 
diff --git a/debian/changelog b/debian/changelog
index bc41c83..76cba56 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+lintian (2.2.14) unstable; urgency=low
+
+  * debian/files:
++ [FL] packages named lib*-camlp4-dev should be in section ocaml
+
+ -- Frank Lichtenheld dj...@debian.org  Sun, 12 Jul 2009 12:57:44 +0200
+
 lintian (2.2.13) unstable; urgency=low
 
   The triggerized install-info release.

-- 
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



[SCM] Debian package checker branch, master, updated. 2.2.13-2-g7f86611

2009-07-13 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 7f86611d17def3486315acb6edc2728595dc8c36
Author: Frank Lichtenheld dj...@debian.org
Date:   Mon Jul 13 08:51:46 2009 +0200

test files-general: Make debian/rules executable

diff --git a/t/tests/files-general/debian/debian/rules 
b/t/tests/files-general/debian/debian/rules
old mode 100644
new mode 100755

-- 
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



Bug#521999: lintian: [checks/shared-libs] use pkgconfig files to check for missing -dev depends

2009-04-02 Thread Frank Lichtenheld
On Tue, Mar 31, 2009 at 12:50:02AM -0300, Gustavo Noronha Silva wrote:
 I had a package rejected by ftpmaster because it was missing some
 dependencies on the new -dev package. Those dependencies are easily
 obtained from matching the pkgconfig Requires field to package names
 providing the pkgconfig package files.
 
 I wrote a patch to make lintian check for packages shipping .pc files
 and not declaring dependencies correctly, and am attaching.
[...]
 + open(PCFILE,  unpacked/$file)
 + or fail(Could not open unpacked/$file for reading!);
 + while(PCFILE) {
 + next unless (m/^requires(\.private)?:(.+)$/i);
 + my @requirements = split(/ /, $2);
 + foreach my $requirement (@requirements) {
 + if ($PKGCONFIG_FILES-known($requirement)) {
 + my $required_package = 
 $PKGCONFIG_FILES-value($requirement);
 + tag pkgconfig-requirement-but-no-depends, $requirement 
 - $required_package
 + unless 
 $info-relation('depends')-implies($required_package);
 + }
 + }
 + }

This will probably need to check whether the requirement is actually fulfilled
within the package we test. Take e.g. libcairo2-dev which provides several .pc
files which have requirements on each other.

Gruesse,
-- 
Frank Lichtenheld dj...@debian.org
www: http://www.djpig.de/



-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] Debian package checker branch, master, updated. 2.2.8-9-g91585f2

2009-03-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 91585f28775234c9310aa3db63f89d74d9f27989
Author: Frank Lichtenheld dj...@debian.org
Date:   Sat Mar 28 16:54:15 2009 +0100

check/fields: Add package name checks for the new sections

Use this  opportunity to move all these checks to one tag
wrong-section-according-to-package-name instead of one tag per section.

diff --git a/checks/fields b/checks/fields
index 221eae9..ba66428 100644
--- a/checks/fields
+++ b/checks/fields
@@ -191,6 +191,23 @@ my @GLOBAL_CLEAN_BYPASS = (
qr'^\s+dh\s+'
 );
 
+# Mapping of package names to section names
+my @NAME_SECTION_MAPPINGS = (
+[ qr/-docs?$/  = 'doc'  ],
+[ qr/-dbg$/= 'debug'],
+[ qr/^python-/ = 'python'   ],
+[ qr/^r-cran-/ = 'gnu-r'],
+[ qr/^lib.*-perl$/ = 'perl' ],
+[ qr/^lib.*-cil$/  = 'cli-mono' ],
+[ qr/^lib.*-java$/ = 'java' ],
+[ qr/^(?:lib)php-/ = 'php'  ],
+[ qr/^lib(?:hugs|ghc6)-/ = 'haskell'   ],
+[ qr/^lib.*-ruby(?:1\.\d)?$/ = 'ruby'  ],
+[ qr/^lib.*-ocaml-dev$/ = 'ocaml'  ],
+[ qr/^lib.*-dev$/  = 'libdevel' ],
+);
+
+
 our $PERL_CORE_PROVIDES = Lintian::Data-new('fields/perl-provides', '\s+');
 our $OBSOLETE_PACKAGES  = Lintian::Data-new('fields/obsolete-packages');
 our $VIRTUAL_PACKAGES   = Lintian::Data-new('fields/virtual-packages');
@@ -432,19 +449,13 @@ if (not defined $info-field('section')) {
}
 
# Check package name - section.
-   if ($pkg =~ /-docs?$/) {
-   tag doc-package-should-be-section-doc, $pkg
-   unless $parts[-1] eq 'doc';
-   } elsif ($pkg =~ /^lib.*-perl$/) {
-   tag perl-package-should-be-section-perl, $pkg
-   unless $parts[-1] eq 'perl';
-   } elsif ($pkg =~ /^python-/) {
-   tag python-package-should-be-section-python, $pkg
-   unless $parts[-1] eq 'python';
-   } elsif ($pkg =~ /^lib.*-dev$/) {
-tag dev-package-should-be-section-libdevel, $pkg
-unless $parts[-1] eq 'libdevel';
-}
+   foreach my $map (@NAME_SECTION_MAPPINGS) {
+   if ($pkg =~ $map-[0]) {
+   tag wrong-section-according-to-package-name, $pkg = 
$map-[1]
+   unless $parts[-1] eq $map-[1];
+   last;
+   }
+   }
 }
 }
 
diff --git a/checks/fields.desc b/checks/fields.desc
index 37f851e..22c09f2 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -908,30 +908,11 @@ Info: The Dm-Upload-Allowed field in this package is set 
to something
  Debian GR is yes and other values (including capitalization variants)
  may not work as expected.
 
-Tag: doc-package-should-be-section-doc
+Tag: wrong-section-according-to-package-name
 Severity: normal
 Certainty: certain
-Info: This package has a name suggesting that it contains only
- documentation.  If so, it should be in section doc.
-
-Tag: python-package-should-be-section-python
-Severity: normal
-Certainty: certain
-Info: This package has a name suggesting that it is a Python extension or
- part of the Python environment.  If so, it should be in section
- python.
-
-Tag: perl-package-should-be-section-perl
-Severity: normal
-Certainty: certain
-Info: This package has a name suggesting that it is a Perl module package.
- If so, it should be in section perl.
-
-Tag: dev-package-should-be-section-libdevel
-Severity: normal
-Certainty: certain
-Info: This package has a name suggesting that it is a library development
- package.  If so, it should be in section libdevel.
+Info: This package has a name suggesting that it belongs to a section
+ other than the one it is currently categorized in.
 
 Tag: debug-package-should-be-priority-extra
 Severity: normal
diff --git a/debian/changelog b/debian/changelog
index 17d71e3..326798d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,14 @@
 lintian (2.2.9) UNRELEASED; urgency=low
 
+  * Summary of tag changes:
++ Added:
+   - wrong-section-according-to-package-name
++ Removed:
+   - dev-package-should-be-section-libdevel
+   - doc-package-should-be-section-doc
+   - perl-package-should-be-section-perl
+   - python-package-should-be-section-python
+  
   * checks/deb-format.desc:
 + [RA] In the tag description, the first required element should be
   debian-binary, not debian-control.  Thanks, Judit Foglszinger.
@@ -8,6 +17,9 @@ lintian (2.2.9) UNRELEASED; urgency=low
 + [FL] Update list of valid sections.
 + [RA] Fix dbg-package-missing-depends check when the dependency is
   followed by a comma.  (Closes: #520640)
++ [FL] Add package name checks for the new sections. Use this opportunity
+  to move all these checks to one tag 
wrong-section-according-to-package-name
+  instead of one tag per section.
   * checks/lintian.desc:
 + [CW] Add

Test failures

2009-03-28 Thread Frank Lichtenheld
Hi.

I noticed that some tests in the test suite currently fail and I'm
pretty sure that it has nothing to do with what I'm working on currently.

But maybe someone else has a quick idea what is going wrong before I invest
my time finding it out?

Running test scripts-diversions 1.0... building... testing... FAILED:
--- t/tests/scripts-diversions/tags 2009-03-15 23:59:59.0 +0100
+++ debian/tests/tags.scripts-diversions2009-03-28 16:42:09.0 
+0100
@@ -2,4 +2,3 @@
 E: scripts-diversions: orphaned-diversion usr/share/scripts/orphan preinst
 E: scripts-diversions: package-uses-local-diversion preinst:12
 E: scripts-diversions: package-uses-local-diversion preinst:16
-E: scripts-diversions: remove-of-unknown-diversion usr/share/scripts/old-file 
postrm:12
Running test binaries-from-other-arch 1.0... building... testing... FAILED:
--- t/tests/binaries-from-other-arch/tags   2009-03-15 23:59:59.0 
+0100
+++ debian/tests/tags.binaries-from-other-arch  2009-03-28 16:42:57.0 
+0100
@@ -1,4 +1,4 @@
 E: binaries-from-other-arch: binary-from-other-architecture ./usr/bin/elfobject
 E: binaries-from-other-arch: statically-linked-binary ./usr/bin/elfobject
-W: binaries-from-other-arch: apparently-truncated-elf-binary 
./usr/bin/elfobject
+W: binaries-from-other-arch: apparently-corrupted-elf-binary 
./usr/bin/elfobject
 W: binaries-from-other-arch: binary-without-manpage usr/bin/elfobject
Running test files-windows-devel-file-in-package 1.0... building... testing... 
FAILED:
--- t/tests/files-windows-devel-file-in-package/tags2008-11-28 
12:06:02.0 +0100
+++ debian/tests/tags.files-windows-devel-file-in-package   2009-03-28 
16:48:28.0 +0100
@@ -1 +1,2 @@
+I: files-windows-devel-file-in-package source: debian-watch-file-is-missing
 W: files-windows-devel-file-in-package: windows-devel-file-in-package 
usr/lib/foo/foo.vcproj
Running test scripts-ocamlrun 1.0... building... testing... FAILED:
--- t/tests/scripts-ocamlrun/tags   2008-11-28 12:06:02.0 +0100
+++ debian/tests/tags.scripts-ocamlrun  2009-03-28 16:50:22.0 +0100
@@ -1 +1,2 @@
+I: scripts-ocamlrun source: debian-watch-file-is-missing
 W: scripts-ocamlrun: binary-without-manpage usr/bin/script1


Gruesse,
-- 
Frank Lichtenheld dj...@debian.org
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#517635: lintian: should warn about incorrect Vcs-* fields

2009-03-28 Thread Frank Lichtenheld
On Sun, Mar 01, 2009 at 03:34:28AM +0100, Євгеній Мещеряков wrote:
 Lintian should warn if Vcs-* filed contains URL for different vcs.
 Example:
   Vcs-Svn: git://git.debian.org/collab-maint/gpscorrelate.git

I've started working on this one. Here is what I have so far.
The first hash contains URIs that look good, the second contains
URIs that look valid but are for a format which probably requires
an account on some machine.

my %VCS_RECOMMENDED_URIS = (
browser = qr;^https?://;,
arch= qr;^https?://;,
bzr = qr;^(lp:~|(?:nosmart\+)?https?://);
cvs = qr;^:pserver:;,
darcs   = qr;^https?://;,
hg  = qr;^https?://;,
git = qr;^(git|https?|rsync)://;,
svn = qr;^(svn|(?:svn\+)?https?)://;,
mtn = undef, #XXX  
 
);
my %VCS_VALID_URIS = (
arch= qr;^https?://;,
bzr = qr;^(sftp|(?:bzr\+)?ssh)://);
cvs = qr;^:ext:;,
git = qr;^ssh://;,
svn = qr;^(?:svn\+)?ssh://;,
);

Comments welcome.

Gruesse,
-- 
Frank Lichtenheld dj...@debian.org
www: http://www.djpig.de/



--
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Test failures

2009-03-28 Thread Frank Lichtenheld
On Sat, Mar 28, 2009 at 11:46:17AM -0600, Raphael Geissert wrote:
 Frank Lichtenheld wrote:
  --- t/tests/binaries-from-other-arch/tags 2009-03-15 23:59:59.0
  +0100
  +++ debian/tests/tags.binaries-from-other-arch2009-03-28
  16:42:57.0 +0100 @@ -1,4 +1,4 @@
   E: binaries-from-other-arch: binary-from-other-architecture
   ./usr/bin/elfobject E: binaries-from-other-arch: statically-linked-binary
   ./usr/bin/elfobject
  -W: binaries-from-other-arch: apparently-truncated-elf-binary
  ./usr/bin/elfobject +W: binaries-from-other-arch:
  apparently-corrupted-elf-binary ./usr/bin/elfobject
   W: binaries-from-other-arch: binary-without-manpage usr/bin/elfobject
 
 This one is tricky; you need squeeze's binutils for it to pass.

Ok, this is a lenny system, so that explains it.

  Running test files-windows-devel-file-in-package 1.0... building...
  testing... FAILED:
  --- t/tests/files-windows-devel-file-in-package/tags  2008-11-28
  12:06:02.0 +0100
  +++ debian/tests/tags.files-windows-devel-file-in-package 2009-03-28
  16:48:28.0 +0100 @@ -1 +1,2 @@
  +I: files-windows-devel-file-in-package source:
  debian-watch-file-is-missing
   W: files-windows-devel-file-in-package: windows-devel-file-in-package
   usr/lib/foo/foo.vcproj
  Running test scripts-ocamlrun 1.0... building... testing... FAILED:
  --- t/tests/scripts-ocamlrun/tags 2008-11-28 12:06:02.0 +0100
  +++ debian/tests/tags.scripts-ocamlrun2009-03-28 16:50:22.0 
  +0100
  @@ -1 +1,2 @@
  +I: scripts-ocamlrun source: debian-watch-file-is-missing
   W: scripts-ocamlrun: binary-without-manpage usr/bin/script1
  
 
 The watch files should be being created by runtests, so it is a bit odd. The
 only recent change there that I remember was the switch from the time-stamp
 and size -based files copying of rsync to the checksum-based one.

False alarm. For some reason I had a .orig.tar.gz lying around for this test
which caused some confusion ;) After I removed it the test now runs fine.

Gruesse,
-- 
Frank Lichtenheld dj...@debian.org
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Test failures

2009-03-28 Thread Frank Lichtenheld
On Sat, Mar 28, 2009 at 11:48:33AM -0700, Russ Allbery wrote:
 Frank Lichtenheld dj...@debian.org writes:
  On Sat, Mar 28, 2009 at 11:46:17AM -0600, Raphael Geissert wrote:
 
  The watch files should be being created by runtests, so it is a bit
  odd. The only recent change there that I remember was the switch from
  the time-stamp and size -based files copying of rsync to the
  checksum-based one.
 
  False alarm. For some reason I had a .orig.tar.gz lying around for this
  test which caused some confusion ;) After I removed it the test now runs
  fine.
 
 Oh, yes, they used to be non-native tests and I switched them to native
 because there was no reason for them to be non-native.  If you had an old
 debian/tests directory sitting around, you'd see that problem.

Maybe debian/rules runtests should just do a rm -fr debian/tests first?

Gruesse,
-- 
Frank Lichtenheld dj...@debian.org
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Test failures

2009-03-28 Thread Frank Lichtenheld
On Sat, Mar 28, 2009 at 11:47:06AM -0700, Russ Allbery wrote:
 Raphael Geissert atomo64+deb...@gmail.com writes:
  Frank Lichtenheld wrote:
 
  Running test scripts-diversions 1.0... building... testing... FAILED:
  --- t/tests/scripts-diversions/tags   2009-03-15 23:59:59.0 +0100
  +++ debian/tests/tags.scripts-diversions  2009-03-28 16:42:09.0
  +0100 @@ -2,4 +2,3 @@
   E: scripts-diversions: orphaned-diversion usr/share/scripts/orphan
   preinst E: scripts-diversions: package-uses-local-diversion preinst:12
   E: scripts-diversions: package-uses-local-diversion preinst:16
  -E: scripts-diversions: remove-of-unknown-diversion
  usr/share/scripts/old-file postrm:12 Running test binaries-from-other-arch
  1.0... building... testing... FAILED:
 
  No idea, but you are not alone:
  $ debian/rules runtests onlyrun=scripts-diversions
  [...]
  Running test scripts-diversions 1.0... building... testing... FAILED:
  --- t/tests/scripts-diversions/tags 2009-03-25 11:21:43.0 -0600
  +++ debian/tests/tags.scripts-diversions2009-03-28
  11:45:03.0 -0600
  @@ -2,4 +2,3 @@
   E: scripts-diversions: orphaned-diversion usr/share/scripts/orphan preinst
   E: scripts-diversions: package-uses-local-diversion preinst:12
   E: scripts-diversions: package-uses-local-diversion preinst:16
  -E: scripts-diversions: remove-of-unknown-diversion
  usr/share/scripts/old-file postrm:12
  make: *** [runtests] Error 1
 
 But it works fine here:
 
 LINTIAN_ROOT= /usr/bin/perl t/runtests -k t debian/tests scripts-diversions
 Package tests:
 Running test scripts-diversions 1.0... building... testing... ok.
 
 I'm mystified, since I can't see anything about this check that would
 change based on what system it was run on, or any remaining ordering
 problems with what order in which the maintainer scripts were read.

It is a ordering problem. The diversion is removed both in postinst and postrm,
and whether the tag is issued depends on which of those files is read last, 
since
it will then overwrite the entry in %removed_diversions. The tag will only be
issued if postrm was read last.

Gruesse,
-- 
Frank Lichtenheld dj...@debian.org
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] Debian package checker branch, master, updated. 2.2.8-14-g00b73dc

2009-03-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 00b73dc3cfbbbcc0dee9cb9ed0cf91c3ed55e4b8
Author: Frank Lichtenheld dj...@debian.org
Date:   Sat Mar 28 22:19:07 2009 +0100

checks/fields:  Add checks for well formatted Vcs-* fields

Closes: #517635

diff --git a/checks/fields b/checks/fields
index ba66428..cf356bc 100644
--- a/checks/fields
+++ b/checks/fields
@@ -207,6 +207,26 @@ my @NAME_SECTION_MAPPINGS = (
 [ qr/^lib.*-dev$/  = 'libdevel' ],
 );
 
+# Valid URI formats for the Vcs-* fields
+# currently only checks the protocol, not the actual format of the URI
+my %VCS_RECOMMENDED_URIS = (
+browser = qr;^https?://;,
+arch= qr;^https?://;,
+bzr = qr;^(lp:~|(?:nosmart\+)?https?://);,
+cvs = qr;^:pserver:;,
+darcs   = qr;^https?://;,
+hg  = qr;^https?://;,
+git = qr;^(?:git|https?|rsync)://;,
+svn = qr;^(?:svn|(?:svn\+)?https?)://;,
+mtn = qr;^[\w.-]+\s+\S+;, # that's a hostname followed by a module 
name
+);
+my %VCS_VALID_URIS = (
+arch= qr;^https?://;,
+bzr = qr;^(?:sftp|(?:bzr\+)?ssh)://;,
+cvs = qr;^(?:-d\s*)?:(?:ext|pserver):;,
+git = qr;^(?:git\+)?ssh://;,
+svn = qr;^(?:svn\+)?ssh://;,
+);
 
 our $PERL_CORE_PROVIDES = Lintian::Data-new('fields/perl-provides', '\s+');
 our $OBSOLETE_PACKAGES  = Lintian::Data-new('fields/obsolete-packages');
@@ -996,6 +1016,22 @@ if (defined $info-field('dm-upload-allowed')) {
}
 }
 
+#- Vcs-*
+
+while (my ($vcs, $regex) = each %VCS_RECOMMENDED_URIS) {
+if (defined $info-field(vcs-$vcs)) {
+   my $uri = $info-field(vcs-$vcs);
+   if ($uri !~ $regex) {
+   if ($VCS_VALID_URIS{$vcs} and $uri =~ $VCS_VALID_URIS{$vcs}) {
+   tag vcs-field-uses-not-recommended-uri-format, vcs-$vcs, 
$uri;
+   } else {
+   tag vcs-field-uses-unknown-uri-format, vcs-$vcs, $uri;
+   }
+   }
+}
+}
+
+
 #- Field checks (without checking the value)
 
 for my $field (glob(fields/*)) {
diff --git a/checks/fields.desc b/checks/fields.desc
index 22c09f2..5a599cc 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -975,3 +975,18 @@ Info: This package is also provided by one of the Perl 
core packages
  .
  Example: perl-modules (gt;= 5.10.0) | libmodule-build-perl (gt;= 0.26)
 Ref: policy 7.5
+
+Tag: vcs-field-uses-not-recommended-uri-format
+Severity: minor
+Certainty: possible
+Info: The VCS-* field uses an URI which doesn't match the recommended
+ format, but still looks valid. Examples for not recommended URI formats
+ are protocols that require authentication (like SSH). Instead where
+ possible you should provide an URI that is accessible for everyone
+ without authentication.
+
+Tag: vcs-field-uses-unknown-uri-format
+Severity: normal
+Certainty: possible
+Info: The VCS-* field uses an URI which doesn't match any known format.
+ You might have forgotten the protocol before the hostname.
diff --git a/debian/changelog b/debian/changelog
index 61db270..6cf791f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ lintian (2.2.9) UNRELEASED; urgency=low
   * Summary of tag changes:
 + Added:
- wrong-section-according-to-package-name
+   - vcs-field-uses-not-recommended-uri-format
+   - vcs-field-uses-unknown-uri-format
 + Removed:
- dev-package-should-be-section-libdevel
- doc-package-should-be-section-doc
@@ -20,6 +22,7 @@ lintian (2.2.9) UNRELEASED; urgency=low
 + [FL] Add package name checks for the new sections.  Move all package
   section checks to one tag wrong-section-according-to-package-name
   instead of one tag per section.
++ [FL] Add checks for well formatted Vcs-* fields.  (Closes: #517635)
   * checks/lintian.desc:
 + [CW] Add karmic as an allowable distribution for Ubuntu (thanks, Soren
   Hansen).
diff --git a/t/tests/debhelper-dh-clean-k-deprecated/debian/debian/control.in 
b/t/tests/fields-malformed-vcs-fields/debian/debian/control.in
similarity index 81%
copy from t/tests/debhelper-dh-clean-k-deprecated/debian/debian/control.in
copy to t/tests/fields-malformed-vcs-fields/debian/debian/control.in
index 3ef3f17..186f60b 100644
--- a/t/tests/debhelper-dh-clean-k-deprecated/debian/debian/control.in
+++ b/t/tests/fields-malformed-vcs-fields/debian/debian/control.in
@@ -4,6 +4,8 @@ Section: {$section}
 Maintainer: {$author}
 Standards-Version: 3.8.1
 Build-Depends: debhelper (= 7)
+Vcs-Browser: svn.debian.org/wsvn/foobar/trunk
+Vcs-Svn: svn+ssh://svn.debian.org/svn/foobar/trunk
 
 Package: {$srcpkg}
 Architecture: {$architecture}
diff --git a/t/tests/fields-malformed-vcs-fields/desc 
b/t/tests/fields-malformed-vcs-fields/desc
new file mode 100644
index 000..5157ddd
--- /dev/null
+++ b/t/tests/fields-malformed-vcs-fields/desc
@@ -0,0 +1,7 @@
+Testname: fields-malformed-vcs-fields
+Sequence: 6000
+Description: Test malformed VCS-* fields
+Version: 1.0
+Test-For:
+ vcs-field

[SCM] Debian package checker branch, master, updated. 2.2.8-1-g12985f3

2009-03-15 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 12985f36ddaa1dbbdecb2a50e97a69030a627598
Author: Frank Lichtenheld dj...@debian.org
Date:   Mon Mar 16 00:14:26 2009 +0100

Update list of valid sections

diff --git a/checks/fields b/checks/fields
index d49d01d..5367a32 100644
--- a/checks/fields
+++ b/checks/fields
@@ -41,11 +41,13 @@ our %known_archive_parts = map { $_ = 1 }
 ('non-free', 'contrib');
 
 our %known_sections = map { $_ = 1 }
-('admin', 'comm', 'devel', 'doc', 'editors', 'electronics',
- 'embedded', 'games', 'gnome', 'graphics', 'hamradio', 'interpreters',
- 'kde', 'libdevel', 'libs', 'mail', 'math', 'misc', 'net', 'news',
- 'oldlibs', 'otherosfs', 'perl', 'python', 'science', 'shells',
- 'sound', 'tex', 'text', 'utils', 'web', 'x11'
+('admin', 'comm', 'cli-mono', 'database', 'debug', 'devel', 'doc',
+ 'editors', 'electronics', 'embedded', 'fonts', 'games', 'gnome', 'gnu-r',
+ 'gnustep', 'graphics', 'hamradio', 'haskell', 'httpd', 'interpreters',
+ 'java', 'kde', 'libdevel', 'libs', 'lisp', 'localization', 'kernel', 
'mail',
+ 'math', 'misc', 'net', 'news', 'ocaml', 'oldlibs', 'otherosfs', 'perl',
+ 'php', 'python', 'ruby', 'science', 'shells', 'sound', 'tex', 'text',
+ 'utils', 'vcs', 'video', 'web', 'x11', 'xfce', 'zope'
 );
 
 our %known_prios = map { $_ = 1 }
diff --git a/checks/fields.desc b/checks/fields.desc
index 395fd2e..37f851e 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -285,10 +285,13 @@ Severity: normal
 Certainty: certain
 Info: The Section: field in this package's control file is not one of
  the sections in use on the ftp archive.  Valid sections are currently
- admin, comm, devel, doc, editors, electronics, embedded, games,
- gnome, graphics, hamradio, interpreters, kde, libdevel, libs, mail, 
- math, misc, net, news, oldlibs, otherosfs, perl, python, science, shells, 
- sound, tex, text, utils, web, and x11.
+ admin, comm, cli-mono, database, debug, devel, doc,
+ editors, electronics, embedded, fonts, games, gnome, gnu-r,
+ gnustep, graphics, hamradio, haskell, httpd, interpreters,
+ java, kde, libdevel, libs, lisp, localization, kernel, mail,
+ math, misc, net, news, ocaml, oldlibs, otherosfs, perl,
+ php, python, ruby, science, shells, sound, tex, text,
+ utils, vcs, video, web, x11, xfce, zope.
  .
  The section name should be preceded by non-free/ if the package
  is in the non-free distribution, and by contrib/ if the package
diff --git a/debian/changelog b/debian/changelog
index 8ea3b90..a49421e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+lintian (2.2.9) UNRELEASED; urgency=low
+
+  * checks/fields{,.desc}:
++ [FL] Update list of valid sections.
+
+ -- Frank Lichtenheld dj...@debian.org  Mon, 16 Mar 2009 00:13:30 +0100
+
 lintian (2.2.8) unstable; urgency=low
 
   The Policy 3.8.1 release.

-- 
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



Bug#515601: lintian: false positive changelog-file-not-compressed if corresponding file is small

2009-02-21 Thread Frank Lichtenheld
On Wed, Feb 18, 2009 at 10:55:07AM +0100, Micha Lenk wrote:
 I wrote some minutes ago:
  Is the package where you encountered this problem publicly available?  I'd
  be happy to take a look at it and try to understand what happened.
  
  Yes, libaqbanking in the affected version is in the archive in unstable.
  You can have a look on the false positives here:
  http://lintian.debian.org/maintainer/mi...@lenk.info.html#libaqbanking
 
 Err, true positives I wanted to say...

Ok, there are some issues mixed here:

1) You install the ChangeLog file with dh_installdocs which is a bug
   in your packaging, since it will already be installed with
   dh_installchangelogs as changelog.
2) lintian complains about the changelog not being compressed but what it
   really should complain about is the duplicated changelog file, which
   it would make it clearer that this is your fault ;)

Gruesse,
-- 
Frank Lichtenheld dj...@debian.org
www: http://www.djpig.de/



-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#516067: lintian: false positives when checking the same package version from different archs

2009-02-21 Thread Frank Lichtenheld
On Wed, Feb 18, 2009 at 11:54:34PM -0600, Raphael Geissert wrote:
 Package: lintian
 Version: 2.2.5
 Severity: minor
 
 Hi all,
 
 $ for f in deb/*; do  lintian $f; done
 $ lintian deb/*
 E: kgb: missing-dependency-on-libc needed by ./usr/bin/kgb
 E: kgb: missing-dependency-on-libc needed by ./usr/bin/kgb
 E: kgb: missing-dependency-on-libc needed by ./usr/bin/kgb
 E: kgb: missing-dependency-on-libc needed by ./usr/bin/kgb
 E: kgb: missing-dependency-on-libc needed by ./usr/bin/kgb
 E: kgb: missing-dependency-on-libc needed by ./usr/bin/kgb
 E: kgb: missing-dependency-on-libc needed by ./usr/bin/kgb
 E: kgb: missing-dependency-on-libc needed by ./usr/bin/kgb
 E: kgb: missing-dependency-on-libc needed by ./usr/bin/kgb
 E: kgb: missing-dependency-on-libc needed by ./usr/bin/kgb
 E: kgb: missing-dependency-on-libc needed by ./usr/bin/kgb
 E: kgb: missing-dependency-on-libc needed by ./usr/bin/kgb
 E: kgb: missing-dependency-on-libc needed by ./usr/bin/kgb
 E: kgb: missing-dependency-on-libc needed by ./usr/bin/kgb
 
 There are 16 debs in deb/ one has a different version than the others.

lintian -v might be helpful.

Gruesse,
-- 
Frank Lichtenheld dj...@debian.org
www: http://www.djpig.de/



-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#515601: lintian: false positive changelog-file-not-compressed if corresponding file is small

2009-02-21 Thread Frank Lichtenheld
On Sat, Feb 21, 2009 at 07:24:30PM +0100, Micha Lenk wrote:
 Frank Lichtenheld schrieb:
  2) lintian complains about the changelog not being compressed but what it
 really should complain about is the duplicated changelog file, which
 it would make it clearer that this is your fault ;)
 
 Yes. So, how do we proceed with this bug now?

I've downgraded it to wishlist. I think it is something that should
be fixed eventually, but it is not urgent. If you want you can
clone it against your package and close that with your next
upload, but I don't really see a point in that.

Gruesse,
-- 
Frank Lichtenheld dj...@debian.org
www: http://www.djpig.de/



-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] Debian package checker branch, master, updated. 2.1.6-13-g86d33e4

2009-01-24 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 86d33e4a9e00554fb59ee324123ae7652d7a088e
Author: Frank Lichtenheld dj...@debian.org
Date:   Sat Jan 24 16:03:22 2009 +0100

checks/binaries: Fix check for directories in the package

diff --git a/checks/binaries b/checks/binaries
index a95bf6d..80d89fd 100644
--- a/checks/binaries
+++ b/checks/binaries
@@ -124,7 +124,7 @@ foreach (sort keys %{$info-file_info}) {
 next unless length $_;
 my $data = $info-file_info-{$_};
 next unless $data =~ /^directory$/ or $data =~ / link to /;
-$directories{$_}++;
+$directories{/$_}++;
 }
 
 # process all files in package
diff --git a/debian/changelog b/debian/changelog
index 88e8eea..d2189de 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ lintian (2.1.7) UNRELEASED; urgency=low
 + [RA] Replace `' balanced quotes with straight double-quotes.  The
   old style looks strange with modern fonts.  Based on work by Raphael
   Geissert.
+  * checks/binaries:
++ [FL] Fix check for directories in the package in RPATH check.
   * checks/changelog-file:
 + [RA] Use Lintian::Collect to read the changelog.
   * checks/control-file.desc:

-- 
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



Re: RFC: [PATCH] Make lintian --info --color=auto work again

2008-11-29 Thread Frank Lichtenheld
On Sat, Nov 29, 2008 at 03:32:26PM +, Adam D. Barratt wrote:
 The attached patch replaces the pipe from the main lintian script to
 lintian-info with an extra flag to Lintian::Output::print_tag()
 indicating whether the full output should be displayed. This allows
 lintian --info --color=auto to produce colourised output when being
 output to a terminal.
 
 Comments welcome.

While I don't doubt that your patch accomplishes it goal, I wonder
whether it would be better to fix this correctly now. By this
I mean:

1) The extended description should be available in the $tag_info
2) The list of already issued tags should probably be a object
   attribute instead of a module attribute.
3) I'm unsure whether the flag show_description shouldn't be an
   object attribute of Lintian::Output instead of a module
   attribute of Tags.

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#507273: lintian: please skip __init__.py from zero-byte-file-in-doc-directory check

2008-11-29 Thread Frank Lichtenheld
On Sat, Nov 29, 2008 at 05:40:05PM +0100, Sandro Tosi wrote:
 __init__.py could be zero-sized, just to mark a directory as a python 
 module,
 and sometimes such dir are installed in doc/ of the package, so please skip 
 that
 file from the zero-byte-file-in-doc-directory check.

We already skip zero-byte-file-in-doc-directory if the file is under
examples/.

But yeah, looking at the tag page, __init__.py and html/*.map
might be good candidates for overriding it even outside of that.

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#499737: [checks/debhelper] emit debhelper-but-no-miscDepends

2008-11-28 Thread Frank Lichtenheld
On Mon, Nov 03, 2008 at 08:19:40PM -0600, Raphael Geissert wrote:
 On Sunday 21 September 2008, you wrote:
  On Sun, Sep 21, 2008 at 01:33:54PM -0500, Raphael Geissert wrote:
   Forwarding a patch I sent in [EMAIL PROTECTED] to the BTS, so it
   is noticed.
 
  This one is currently on my 2.1.0 TODO list. Which should not keep
  anyone else from picking it up earlier of course ;)
 
 I'm not really sure, but I think you sent me an email about this and the 
 patch 
 no longer applying in master. I can't confirm that you actually said that 
 because I haven't found any email stating such a thing but well...
 
 Attached is the output of git diff origin/master -- checks/debhelper*; IOW: 
 if 
 the previous patch does no longer apply just don't apply those modifying 
 checks/debhelper* and apply the one attached in this email.
 
 And since I haven't found where I sent the script that takes care of updating 
 the data files I'm also attaching it.
 
 I hope this isn't a confusion on my side.

Yeah, I remember sending that mail, too, but also can't find it
currently. Anyway, the whole problem could be mitigated in the
future if you use proper topic branches for your patches, at least
the more invasive ones. This one didn't apply, because it was based
upon earlier patches of you that aren't applied and so no 3-way merge is
possible, because my git repository doesn't contain the necessary files.

I will fix up that one by hand now, since I already started with it.

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: 2.1.0 upload?

2008-11-28 Thread Frank Lichtenheld
On Tue, Nov 18, 2008 at 08:24:11PM +, Adam D. Barratt wrote:
 Hi,
 
 It's nearly two months since we released lintian 2.0.0 and lintian.d.o
 is still running ~rc2, so I thought I'd raise the question of releasing
 2.1.0.
 
 Personally, I think that Frank's Lintian::Command and Lintian::Output
 work is more than worth an upload. In terms of lintian.d.o, there's also
 an update to the readelf parsing code which should (finally) produce the
 correct results on etch without causing lots of errors on debug
 packages.

Yeah, it is really long overdue. Will take care to do that during the
stay here at Extremadura, probably this evening.

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#505857: lintian: false positive debian-watch-file-should-mangle-version

2008-11-28 Thread Frank Lichtenheld
On Sun, Nov 16, 2008 at 11:21:09AM +0100, Jiří Paleček wrote:
 I'm getting a lintian warning an the package ltp:
 
 W: ltp source: debian-watch-file-should-mangle-version
 
 however, the watch file in question actually does mangle the version on  
 the line
 
 opts=dversionmangle=s/\+.*$// \
 http://sf.net/ltp/ltp-full-([0-9]+)\.tgz debian git-import-orig
 
 which correctly changes 20081031+dfsg to 20081031.

I think the check is fooled by your overreaching regex. If you
replace it with s/\+dfsg.*$// it should stop complaining.

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#498875: tagging 498875

2008-11-28 Thread Frank Lichtenheld
# Automatically generated email from bts, devscripts version 2.10.35
# see my comments
tags 498875 moreinfo




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-67-g6e0646e

2008-11-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit c047e676c171291af3873610c975e7323431597b
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Nov 28 12:21:34 2008 +0100

checks/scripts: Add icmake as a known interpreter

Closes: #505868

diff --git a/checks/scripts b/checks/scripts
index 37850bb..a5a1c22 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -63,6 +63,7 @@ our %interpreters =
  gforth= [ '/usr/bin' ],
  gnuplot   = [ '/usr/bin' ],
  gosh  = [ '/usr/bin', 'gauche' ],
+ icmake= [ '/usr/bin', 'icmake' ],
  'install-menu' = [ '/usr/bin', '' ],
  jed   = [ '/usr/bin' ],
  'jed-script'   = [ '/usr/bin', 'jed | xjed' ],
diff --git a/debian/changelog b/debian/changelog
index 39f92ee..32c9a0c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -42,6 +42,8 @@ lintian (2.1.0) unstable; urgency=low
   (Closes: #498892)
   * check/scripts:
 + [FL] Use $known_shells_regex from common_data.
++ [FL] Add icmake as a known interpreter as requested by
+  Frank B. Brokken.  (Closes: #505868)
   * checks/shared-libs{,.desc}:
 + [ADB] Don't issue both symbols-file-contains-debian-revision and
   symbols-file-contains-current-version-with-debian-revision for any

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-67-g6e0646e

2008-11-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 8521701e83994410d09a2d6179d99358ddeef957
Author: Raphael Geissert [EMAIL PROTECTED]
Date:   Fri Nov 28 15:48:17 2008 +0100

private/refresh-debhelper-data: New script to update debhelper related data

- data/debhelper/miscDepends_commands: debhelper commands that set
  misc:Depends
- data/debhelper/maint_commands: debhelper commands that edit
  maintainer scripts
- data/debhelper/dh_packages: packages that contain debhelper commands
- data/debhelper/dh_commands: mapping of debhelper commands to
  packages they are contained in

diff --git a/debian/changelog b/debian/changelog
index 32c9a0c..f1ab9f0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -102,6 +102,16 @@ lintian (2.1.0) unstable; urgency=low
 + [FL] Convert to use Lintian::Output.
 + [FL] Add some new utility functions: delete_dir copy_dir gunzip_file
   touch_file.
+  
+  * private/refresh-debhelper-data:
++ [FL] New script to update debhelper related data by Raphael Geissert.
+  - data/debhelper/miscDepends_commands: debhelper commands that set
+ misc:Depends
+  - data/debhelper/maint_commands: debhelper commands that edit
+ maintainer scripts
+  - data/debhelper/dh_packages: packages that contain debhelper commands
+  - data/debhelper/dh_commands: mapping of debhelper commands to
+ packages they are contained in
 
   * testset/files:
 + [ADB] Generate the file files/'\  at build time instead of
diff --git a/debian/copyright b/debian/copyright
index 449c970..cf701aa 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -35,6 +35,7 @@ Portions Copyright (C) 2006 Adeodato Simó
 Portions Copyright (C) 2007, 2008 Russ Allbery
 Portions Copyright (C) 2008 Patrick Schoenfeld
 Portions Copyright (C) 2008 Niko Tyni
+Portions Copyright (C) 2008 Raphael Geissert
 
 This program is free software; you may redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/private/refresh-debhelper-data b/private/refresh-debhelper-data
new file mode 100755
index 000..a73a24a
--- /dev/null
+++ b/private/refresh-debhelper-data
@@ -0,0 +1,142 @@
+#!/bin/sh
+
+
+#Copyright (C) 2008 by Raphael Geissert [EMAIL PROTECTED]
+#
+#
+#This file is free software: you can redistribute it and/or modify
+#it under the terms of the GNU General Public License as published by
+#the Free Software Foundation, either version 2 of the License, or
+#(at your option) any later version.
+#
+#This file is distributed in the hope that it will be useful,
+#but WITHOUT ANY WARRANTY; without even the implied warranty of
+#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#GNU General Public License for more details.
+#
+#You should have received a copy of the GNU General Public License
+#along with this file.  If not, see http://www.gnu.org/licenses/.
+
+
+set -e
+
+if [ -z $1 ]; then
+printf Usage: %s path/to/lintian/data [Contents-arch.(gz|bz2|)]\n \
+   $(basename $0)
+cat INFO
+
+If the Contents file is specified, the list of dh_ commands found there will
+be compared with the list at lintian/data/debhelper/dh_commands and will
+indicate if the list is up to date with an exit status of zero.
+
+If the Contents file is not specified, the script will download the following
+files from a mirror (which should be specified via the DEB_MIRROR env var, 
+which defaults to http://i386-geomirror.debian.net/debian and is used directly
+without any kind of parsing so one can play with it):
+* Contents-i386.gz, main/binary-i386/Packages.gz
+* Binary packages found at Contents shipping dh_ commands
+Any special parameter can be passed to wget via WGET_ARGS, if needed.
+
+Other options:
+Other variables such as GREP_OPTIONS can be used to enable things like --mmap.
+INFO
+exit
+fi
+
+readonly lintian_data=$(readlink -f $1)
+readonly contents=$(readlink -f $2)
+readonly dh_regex='^usr/bin/dh_.'
+readonly dh_perl_regex='^usr/bin/(dh_[^\s]+)\s+\w+/([^,]+).*'
+offline=0
+
+[ -d $lintian_data ] || {
+printf %s is not a directory, aborting $lintiandata 2
+exit 1
+}
+
+[ ! -z $contents -a ! -f $contents ]  {
+printf %s is not a file, aborting $contents 2
+exit 1
+}
+
+[ -z $contents ] || offline=1
+
+readonly workdir=$(mktemp -d)
+
+cleanup () {
+[ ! -d $workdir ] || rm -rf $workdir
+}; trap cleanup EXIT
+
+if [ $offline -eq 1 ]; then
+known_commands=$lintian_data/debhelper/dh_commands
+[ -f $known_commands ] || exit 1
+new_commands=$workdir/new
+
+case $contents in
+   *.gz)
+   command=zgrep
+   ;;
+   *.bz2)
+   command=bzgrep
+   ;;
+   *)
+   command=grep
+   ;;
+esac
+which $command 21 1/dev/null || exit 2
+
+$command -E $dh_regex $contents \
+   | perl -p -w -E 

[SCM] Debian package checker branch, master, updated. 2.0.0-67-g6e0646e

2008-11-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 936985a095dd59f2a322e77a307ed056d3045338
Author: Raphael Geissert [EMAIL PROTECTED]
Date:   Fri Nov 28 15:52:25 2008 +0100

checks/debhelper: Recognise debhelper commands invoked with - prefix

diff --git a/checks/debhelper b/checks/debhelper
index 6dc81b5..3c53aea 100644
--- a/checks/debhelper
+++ b/checks/debhelper
@@ -96,7 +96,7 @@ open(RULES, '', debfiles/rules) or fail(cannot read 
debian/rules: $!);
 my $dhcompatvalue;
 my @versioncheck;
 while (RULES) {
-if (m/^\s+(dh_\w+)/) {
+if (m/^\s+-?(dh_\w+)/) {
 my $dhcommand = $1;
if ($dhcommand =~ /dh_testversion(?:\s+(.+))?/) {
$needversiondepends = $1 if ($1);

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-67-g6e0646e

2008-11-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 439ef5eba193fe4a40281fbb7f0066c325b333d7
Author: Raphael Geissert [EMAIL PROTECTED]
Date:   Fri Nov 28 15:58:20 2008 +0100

checks/debhelper: rename $depends to $bdepends to make purpose clearer

diff --git a/checks/debhelper b/checks/debhelper
index 8524a43..4e0917b 100644
--- a/checks/debhelper
+++ b/checks/debhelper
@@ -123,7 +123,7 @@ my $single_pkg = keys(%$pkgs) == 1 ? 
$pkgs-{(keys(%$pkgs))[0]} : '';
 # If we got this far, they need to have #DEBHELPER# in their scripts.  Search
 # for scripts that look like maintainer scripts.  Also collect dependency
 # information from debian/control and check compatibility level.
-my $depends;
+my $bdepends;
 opendir(DEBIAN, 'debfiles')
 or fail(Can't open debfiles directory.);
 while (defined(my $file=readdir(DEBIAN))) {
@@ -164,14 +164,14 @@ while (defined(my $file=readdir(DEBIAN))) {
}
 } elsif ($file =~ m/^control$/) {
 my ($control) = read_dpkg_control(debfiles/$file);
-$depends = '';
+$bdepends = '';
 for my $field ('build-depends', 'build-depends-indep') {
 next unless $control-{$field};
-$depends .= ', ' if $depends;
-$depends .= $control-{$field};
+$bdepends .= ', ' if $bdepends;
+$bdepends .= $control-{$field};
 }
-$depends = Dep::parse($depends);
-if ($needbuilddepends  ! Dep::implies($depends, 
Dep::parse('debhelper'))) {
+$bdepends = Dep::parse($bdepends);
+if ($needbuilddepends  ! Dep::implies($bdepends, 
Dep::parse('debhelper'))) {
tag package-uses-debhelper-but-lacks-build-depends, ;
}
 } elsif ($file =~ m/^ex\.|\.ex$/i) {
@@ -200,13 +200,13 @@ if ($usescdbs and not $needversiondepends) {
 $needversiondepends ||= 1;
 if ($needversiondepends  4) {
 tag package-uses-deprecated-debhelper-compat-version, 
$needversiondepends;
-} elsif ($needversiondepends  5 and ! Dep::implies($depends, 
Dep::parse(debhelper (= $needversiondepends {
+} elsif ($needversiondepends  5 and ! Dep::implies($bdepends, 
Dep::parse(debhelper (= $needversiondepends {
 tag package-lacks-versioned-build-depends-on-debhelper, 
$needversiondepends;
 } elsif (@versioncheck) {
 for my $program (@versioncheck) {
 my $required = $versions{$program};
 tag 'debhelper-script-needs-versioned-build-depends', $program, (= 
$required)
-unless Dep::implies($depends, Dep::parse(debhelper (= 
$required)));
+unless Dep::implies($bdepends, Dep::parse(debhelper (= 
$required)));
 }
 }
 

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-67-g6e0646e

2008-11-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit c3f2e627e3576e13f2499cd13ff5d1973d536219
Author: Raphael Geissert [EMAIL PROTECTED]
Date:   Fri Nov 28 15:56:32 2008 +0100

checks/debhelper: Use Lintian::Data for list of debhelper commands
that modify maintainer scripts

diff --git a/checks/debhelper b/checks/debhelper
index 3c53aea..8524a43 100644
--- a/checks/debhelper
+++ b/checks/debhelper
@@ -25,6 +25,7 @@ use lib $ENV{'LINTIAN_ROOT'}/lib;
 use Dep;
 use Tags;
 use Util;
+use Lintian::Data;
 
 # If there is no debian/compat file present but cdbs is being used, cdbs will
 # create one automatically.  Currently it always uses compatibility level 5.
@@ -33,38 +34,7 @@ use Util;
 
 my $cdbscompat = 5;
 
-# Parse the debian/rules file, and try to figure out if debhelper commands
-# are run in it that like to modify maintainer scripts. Those debhelper
-# commands can be found by grep -l autoscript /usr/bin/dh_*, but I'll
-# hardcode them here.
-
-my %commands;
-map { $commands{$_}=1 } qw(dh_desktop
-  dh_gconf
-  dh_icons
-  dh_installcatalogs
-  dh_installdebconf
-   dh_installdefoma
-   dh_installdocs
-  dh_installemacsen
-  dh_installinfo
-  dh_installinit
-  dh_installmenu
-  dh_installmime
-  dh_installmodules
-  dh_installtex
-  dh_installudev
-  dh_installwm
-  dh_installxfonts
-  dh_installxmlcatalogs
-  dh_makeshlibs
-  dh_pycentral
-  dh_pysupport
-  dh_python
-  dh_scrollkeeper
-  dh_suidregister
-  dh_usrlocal
-  );
+my $maint_commands = Lintian::Data-new ('debhelper/maint_commands');
 
 # The version at which debhelper commands were introduced.  Packages that use
 # one of these commands must have a dependency on that version of debhelper or
@@ -109,7 +79,7 @@ while (RULES) {
tag dh_suidregister-is-obsolete, ;
}
# if command is passed -n, it does not modify the scripts
-   if ($commands{$dhcommand} and not m/\s+\-n\s+/) {
+   if ($maint_commands-known($dhcommand) and not m/\s+\-n\s+/) {
$needtomodifyscripts = 1;
}
 if ($versions{$dhcommand}) {
diff --git a/debian/changelog b/debian/changelog
index f1ab9f0..37db9c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,9 @@ lintian (2.1.0) unstable; urgency=low
 + [ADB] Don't detect the use of ? as a literal character or wildcard
   as part of a question in an extended template description.  Based
   on a patch by Stephen Gran.  (Closes: #500661)
+  * checks/debhelper:
++ [FL] Use Lintian::Data for list of debhelper commands that modify
+  maintainer scripts.  Patch by Raphael Geissert.
   * checks/fields:
 + [ADB] Ignore non-dependency fields when considering whether a
   versioned dependency is satisfied by the perl core packages.

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-67-g6e0646e

2008-11-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 96a38813c5de7e83b78029f6275559c0bc8c1b0e
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Nov 28 17:00:18 2008 +0100

Don't expect a removed warning anymore

diff --git a/testset/tags.relations b/testset/tags.relations
index 10a157d..df3f99e 100644
--- a/testset/tags.relations
+++ b/testset/tags.relations
@@ -7,7 +7,6 @@ E: relations source: build-depends-on-obsolete-package 
build-depends-indep: debm
 E: relations source: depends-on-build-essential-package-without-using-version 
libc6-dev [build-depends: libc6-dev]
 E: relations source: depends-on-build-essential-package-without-using-version 
make [build-depends-indep: make]
 E: relations source: invalid-arch-string-in-source-relation test 
[build-conflicts: bar [alpha test]]
-E: relations source: missing-build-dependency libmodule-build-perl
 E: relations source: section-category-mismatch Package relations-multiple-libs
 E: relations-multiple-libs: alternates-not-allowed enhances
 E: relations-multiple-libs: conflicts-with-dependency depends libpng2

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-67-g6e0646e

2008-11-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 689e22c7047320faefcc640289adcdd8a6060775
Author: Raphael Geissert [EMAIL PROTECTED]
Date:   Fri Nov 28 17:09:19 2008 +0100

checks/debhelper: Add new tag for dependencies of additional debhelper 
commands

This complements package-uses-debhelper-but-lacks-build-depends for commands
that are not part of the debhelper package.

diff --git a/checks/debhelper b/checks/debhelper
index 4e0917b..59e8745 100644
--- a/checks/debhelper
+++ b/checks/debhelper
@@ -35,6 +35,7 @@ use Lintian::Data;
 my $cdbscompat = 5;
 
 my $maint_commands = Lintian::Data-new ('debhelper/maint_commands');
+my $dh_commands_depends = Lintian::Data-new ('debhelper/dh_commands', '=');
 
 # The version at which debhelper commands were introduced.  Packages that use
 # one of these commands must have a dependency on that version of debhelper or
@@ -61,6 +62,7 @@ my $compat = '';
 my $usescdbs = '';
 my $seendhpython = '';
 my $usescdbspython = '';
+my %missingbdeps;
 
 open(RULES, '', debfiles/rules) or fail(cannot read debian/rules: $!);
 my $dhcompatvalue;
@@ -82,6 +84,10 @@ while (RULES) {
if ($maint_commands-known($dhcommand) and not m/\s+\-n\s+/) {
$needtomodifyscripts = 1;
}
+   if ($dh_commands_depends-known($dhcommand)) {
+   my $dep = $dh_commands_depends-value($dhcommand);
+   $missingbdeps{$dep} = $dhcommand;
+   }
 if ($versions{$dhcommand}) {
 push (@versioncheck, $dhcommand);
 }
@@ -174,6 +180,11 @@ while (defined(my $file=readdir(DEBIAN))) {
 if ($needbuilddepends  ! Dep::implies($bdepends, 
Dep::parse('debhelper'))) {
tag package-uses-debhelper-but-lacks-build-depends, ;
}
+   while (my ($dep, $command) = each %missingbdeps) {
+   next if $dep eq 'debhelper'; #handled above
+   tag 'missing-build-dependency-for-dh_-command', $command=$dep
+   unless (Dep::implies($bdepends, Dep::parse($dep)));
+   }
 } elsif ($file =~ m/^ex\.|\.ex$/i) {
 tag dh-make-template-in-source, debian/$file;
 }
diff --git a/checks/debhelper.desc b/checks/debhelper.desc
index 603eae4..811f544 100644
--- a/checks/debhelper.desc
+++ b/checks/debhelper.desc
@@ -105,6 +105,14 @@ Info: This package uses dh_python but apparently does not 
tell it to use
  may mean that the package has not been converted to the current Python
  policy, in which case it probably should be.
 
+Tag: missing-build-dependency-for-dh_-command
+Type: error
+Severity: important
+Certainty: possible
+Info: The source package appears to be using a dh_ command but doesn't build
+ depend on the package that actually provides it.  If it uses it, it must
+ build depend on it.
+
 Tag: debhelper-script-needs-versioned-build-depends
 Severity: normal
 Certainty: certain
diff --git a/debian/changelog b/debian/changelog
index 37db9c8..1c1056f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ lintian (2.1.0) unstable; urgency=low
 
   * Summary of tag changes:
 + Added
+  - missing-build-dependency-for-dh_-command
   - quilt-patch-missing-description
   - shlib-calls-exit
 
@@ -17,6 +18,9 @@ lintian (2.1.0) unstable; urgency=low
   * checks/debhelper:
 + [FL] Use Lintian::Data for list of debhelper commands that modify
   maintainer scripts.  Patch by Raphael Geissert.
++ [FL] Add new tag missing-build-dependency-for-dh_-command for
+  debhelper commands that are not from the debhelper package.
+  Patch by Raphael Geissert.
   * checks/fields:
 + [ADB] Ignore non-dependency fields when considering whether a
   versioned dependency is satisfied by the perl core packages.
diff --git a/testset/dh-test/debian/rules b/testset/dh-test/debian/rules
index dbe5113..613cf7c 100755
--- a/testset/dh-test/debian/rules
+++ b/testset/dh-test/debian/rules
@@ -81,7 +81,9 @@ binary-arch: build install
 #  dh_installinit
 #  dh_installcron
 #  dh_installinfo
+   dh_installxfonts
dh_installman
+   -dh_gnustep
 #  dh_dhelp
dh_suidregister
dh_link
@@ -89,6 +91,7 @@ binary-arch: build install
dh_compress
dh_fixperms
 #  dh_perl
+   -dh_lisp
 #  dh_python
 #  dh_makeshlibs
dh_installdeb
diff --git a/testset/tags.dh-test b/testset/tags.dh-test
index 9c6e4a4..4e6249c 100644
--- a/testset/tags.dh-test
+++ b/testset/tags.dh-test
@@ -1,3 +1,5 @@
+E: dh-test source: missing-build-dependency-for-dh_-command 
dh_gnustep=gnustep-make
+E: dh-test source: missing-build-dependency-for-dh_-command dh_lisp=dh-lisp
 E: dh-test: description-is-dh_make-template
 E: dh-test: helper-templates-in-copyright
 E: dh-test: section-is-dh_make-template

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-67-g6e0646e

2008-11-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 42e7c9a0706b32db95b7b16d0e1e1dc0e13184a1
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Nov 28 16:52:56 2008 +0100

Commit the new debhelper data files

diff --git a/data/debhelper/dh_commands b/data/debhelper/dh_commands
new file mode 100644
index 000..e1ab66e
--- /dev/null
+++ b/data/debhelper/dh_commands
@@ -0,0 +1,96 @@
+dh_auto_build=debhelper
+dh_auto_clean=debhelper
+dh_auto_configure=debhelper
+dh_auto_install=debhelper
+dh_auto_test=debhelper
+dh_bash-completion=bash-completion
+dh_builddeb=debhelper
+dh_buildinfo=dh-buildinfo
+dh_clean=debhelper
+dh_clideps=cli-common-dev
+dh_clifixperms=cli-common-dev
+dh_cligacpolicy=cli-common-dev
+dh_clistrip=cli-common-dev
+dh_compress=debhelper
+dh_consoledata=dh-consoledata
+dh_desktop=debhelper
+dh_fixperms=debhelper
+dh_gconf=debhelper
+dh_gencontrol=debhelper
+dh_gnustep=gnustep-make
+dh_gstscancodecs=gstreamer-tools
+dh_gtkmodules=libgtk2.0-dev
+dh_haskell_build=haskell-devscripts
+dh_haskell_buildinst=haskell-devscripts
+dh_haskell_configure=haskell-devscripts
+dh_haskell_depends=haskell-devscripts
+dh_haskell=haskell-devscripts
+dh_haskell_install=haskell-devscripts
+dh_haskell_prep=haskell-devscripts
+dh_icons=debhelper
+dh_installcatalogs=debhelper
+dh_installchangelogs=debhelper
+dh_installcligac=cli-common-dev
+dh_installcron=debhelper
+dh_installdebconf=debhelper
+dh_installdeb=debhelper
+dh_install=debhelper
+dh_installdefoma=defoma
+dh_installdirs=debhelper
+dh_installdocs=debhelper
+dh_installemacsen=debhelper
+dh_installexamples=debhelper
+dh_installifupdown=debhelper
+dh_installinfo=debhelper
+dh_installinit=debhelper
+dh_installkpatches=dh-kpatches
+dh_installlisting=desktop-profiles
+dh_installlogcheck=debhelper
+dh_installlogrotate=debhelper
+dh_installman=debhelper
+dh_installmanpages=debhelper
+dh_installmenu=debhelper
+dh_installmime=debhelper
+dh_installmodules=debhelper
+dh_installpam=debhelper
+dh_installppp=debhelper
+dh_installtex=tex-common
+dh_installudev=debhelper
+dh_installwm=debhelper
+dh_installxfonts=debhelper
+dh_installxmlcatalogs=xml-core
+dh_installxsp=mono-xsp-base
+dh_installyorick=yorick-dev
+dh_installzopeinstance=zope-debhelper
+dh_installzope=zope-debhelper
+dh_javadoc=gjdoc
+dh_link=debhelper
+dh_lintian=debhelper
+dh_lisp=dh-lisp
+dh_listpackages=debhelper
+dh_makeclilibs=cli-common-dev
+dh_make=dh-make
+dh_makeshlibs=debhelper
+dh_md5sums=debhelper
+dh_metainit=dh-metainit
+dh_movefiles=debhelper
+dh_nativejava=java-gcj-compat-dev
+dh_ocaml=ocaml-nox
+dh_pangomodules=libpango1.0-dev
+dh_perl=debhelper
+dh_pidgin=pidgin-dev
+dh_prep=debhelper
+dh_pycentral=python-central
+dh_pysupport=python-support
+dh_python=debhelper
+dh_rdoc=ruby-pkg-tools
+dh_scrollkeeper=debhelper
+dh_shlibdeps=debhelper
+dh_strip=debhelper
+dh_suidregister=debhelper
+dh_testdir=debhelper
+dh_testroot=debhelper
+dh_testversion=debhelper
+dh_undocumented=debhelper
+dh_upx=upx-ucl
+dh_usrlocal=debhelper
diff --git a/data/debhelper/dh_packages b/data/debhelper/dh_packages
new file mode 100644
index 000..93c186c
--- /dev/null
+++ b/data/debhelper/dh_packages
@@ -0,0 +1,29 @@
+bash-completion
+cli-common-dev
+debhelper
+defoma
+desktop-profiles
+dh-buildinfo
+dh-consoledata
+dh-kpatches
+dh-lisp
+dh-make
+dh-metainit
+gjdoc
+gnustep-make
+gstreamer-tools
+haskell-devscripts
+java-gcj-compat-dev
+libgtk2.0-dev
+libpango1.0-dev
+mono-xsp-base
+ocaml-nox
+pidgin-dev
+python-central
+python-support
+ruby-pkg-tools
+tex-common
+upx-ucl
+xml-core
+yorick-dev
+zope-debhelper
diff --git a/data/debhelper/maint_commands b/data/debhelper/maint_commands
new file mode 100644
index 000..832c799
--- /dev/null
+++ b/data/debhelper/maint_commands
@@ -0,0 +1,37 @@
+dh_cligacpolicy
+dh_consoledata
+dh_desktop
+dh_gconf
+dh_haskell_prep
+dh_icons
+dh_installcatalogs
+dh_installcligac
+dh_installdebconf
+dh_installdefoma
+dh_installdocs
+dh_installemacsen
+dh_installinfo
+dh_installinit
+dh_installlisting
+dh_installmenu
+dh_installmime
+dh_installmodules
+dh_installtex
+dh_installudev
+dh_installwm
+dh_installxfonts
+dh_installxmlcatalogs
+dh_installxsp
+dh_installzope
+dh_installzopeinstance
+dh_lisp
+dh_makeshlibs
+dh_metainit
+dh_nativejava
+dh_ocaml
+dh_pycentral
+dh_pysupport
+dh_python
+dh_scrollkeeper
+dh_suidregister
+dh_usrlocal
diff --git a/data/debhelper/miscDepends_commands 
b/data/debhelper/miscDepends_commands
new file mode 100644
index 000..0afb23c
--- /dev/null
+++ b/data/debhelper/miscDepends_commands
@@ -0,0 +1,12 @@
+dh_gconf
+dh_gtkmodules
+dh_installcatalogs
+dh_installdebconf
+dh_installlisting
+dh_installtex
+dh_installxfonts
+dh_installxmlcatalogs
+dh_lisp
+dh_nativejava
+dh_pangomodules
+dh_pidgin

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-67-g6e0646e

2008-11-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 6e0646e8308e299105eaf7d50e534bb8cb34ec64
Author: Raphael Geissert [EMAIL PROTECTED]
Date:   Fri Nov 28 17:27:05 2008 +0100

checks/debhelper: Add new tag debhelper-but-no-misc-depends

Warns about missing misc:Depends substvar if you use commands
that might set it.

Closes: #499737

diff --git a/checks/debhelper b/checks/debhelper
index 59e8745..93186bb 100644
--- a/checks/debhelper
+++ b/checks/debhelper
@@ -35,6 +35,7 @@ use Lintian::Data;
 my $cdbscompat = 5;
 
 my $maint_commands = Lintian::Data-new ('debhelper/maint_commands');
+my $miscDeps_commands = Lintian::Data-new ('debhelper/miscDepends_commands');
 my $dh_commands_depends = Lintian::Data-new ('debhelper/dh_commands', '=');
 
 # The version at which debhelper commands were introduced.  Packages that use
@@ -62,6 +63,7 @@ my $compat = '';
 my $usescdbs = '';
 my $seendhpython = '';
 my $usescdbspython = '';
+my $needmiscdepends = 0;
 my %missingbdeps;
 
 open(RULES, '', debfiles/rules) or fail(cannot read debian/rules: $!);
@@ -84,23 +86,28 @@ while (RULES) {
if ($maint_commands-known($dhcommand) and not m/\s+\-n\s+/) {
$needtomodifyscripts = 1;
}
+   if ($miscDeps_commands-known($dhcommand)) {
+   $needmiscdepends = 1;
+   }
if ($dh_commands_depends-known($dhcommand)) {
my $dep = $dh_commands_depends-value($dhcommand);
$missingbdeps{$dep} = $dhcommand;
}
-if ($versions{$dhcommand}) {
-push (@versioncheck, $dhcommand);
-}
+   if ($versions{$dhcommand}) {
+   push (@versioncheck, $dhcommand);
+   }
$seencommand = 1;
$needbuilddepends = 1;
 } elsif (m,^\s+dh\s+,) {
$seencommand = 1;
$needbuilddepends = 1;
+   $needmiscdepends = 1;
push (@versioncheck, 'dh');
 } elsif (m,^include\s+/usr/share/cdbs/1/rules/debhelper.mk,) {
$seencommand = 1;
$needbuilddepends = 1;
$needtomodifyscripts = 1;
+   $needmiscdepends = 1;
 
# CDBS sets DH_COMPAT but doesn't export it.  It does, however, create
# a debian/compat file if none was found; that logic is handled later.
@@ -126,6 +133,22 @@ return unless $seencommand;
 my $pkgs = $info-binaries;
 my $single_pkg = keys(%$pkgs) == 1 ? $pkgs-{(keys(%$pkgs))[0]} : '';
 
+for my $binpkg (keys %$pkgs) {
+my $depends = '';
+local $/;
+
+foreach my $field (qw(depends recommends suggests)) {
+   if (open DEPENDS, '', control/$binpkg/$field) {
+   chomp ($depends .= DEPENDS);
+   close(DEPENDS);
+   }
+}
+
+tag 'debhelper-but-no-misc-depends', $binpkg
+if $needmiscdepends and $depends !~ m/\$\{misc:Depends\}/
+  and $pkgs-{$binpkg} eq 'deb';
+}
+
 # If we got this far, they need to have #DEBHELPER# in their scripts.  Search
 # for scripts that look like maintainer scripts.  Also collect dependency
 # information from debian/control and check compatibility level.
diff --git a/checks/debhelper.desc b/checks/debhelper.desc
index 811f544..2a00357 100644
--- a/checks/debhelper.desc
+++ b/checks/debhelper.desc
@@ -105,6 +105,16 @@ Info: This package uses dh_python but apparently does not 
tell it to use
  may mean that the package has not been converted to the current Python
  policy, in which case it probably should be.
 
+Tag: debhelper-but-no-misc-depends
+Type: warning
+Severity: normal
+Certainty: certain
+Ref: debhelper(7)
+Info: The source package uses debhelper but it does not use ${misc:Depends} in
+ the given binary package's debian/control entry.  This is required so the
+ dependencies are set correctly in case the result of a call to any of the dh_
+ commands cause the package to depend on another package.
+
 Tag: missing-build-dependency-for-dh_-command
 Type: error
 Severity: important
diff --git a/debian/changelog b/debian/changelog
index 1c1056f..4e39f47 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ lintian (2.1.0) unstable; urgency=low
 
   * Summary of tag changes:
 + Added
+  - debhelper-but-no-misc-depends
   - missing-build-dependency-for-dh_-command
   - quilt-patch-missing-description
   - shlib-calls-exit
@@ -21,6 +22,9 @@ lintian (2.1.0) unstable; urgency=low
 + [FL] Add new tag missing-build-dependency-for-dh_-command for
   debhelper commands that are not from the debhelper package.
   Patch by Raphael Geissert.
++ [FL] Add new tag debhelper-but-no-misc-depends which warns
+  about missing misc:Depends if you use commands that might
+  set it.  Patch by Raphael Geissert.  (Closes: #499737)
   * checks/fields:
 + [ADB] Ignore non-dependency fields when considering whether a
   versioned dependency is satisfied by the perl core packages.
diff --git a/testset/dh-test/debian/control b/testset/dh-test/debian/control
index febe799..d0890b2 100644
--- 

Re: [SCM] Debian package checker branch, master, updated. 2.0.0-58-gbec18b4

2008-11-28 Thread Frank Lichtenheld
On Fri, Nov 28, 2008 at 04:31:56PM +, Adam D. Barratt wrote:
 Generate a file rather than shipping it to allow us to be imported in to 
 bzr

May I ask who needs that? ;)

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: [SCM] Debian package checker branch, master, updated. 2.0.0-58-gbec18b4

2008-11-28 Thread Frank Lichtenheld
On Fri, Nov 28, 2008 at 05:03:38PM -, Adam D. Barratt wrote:
 On Fri, 28 Nov 2008 17:40:02 +0100, Frank Lichtenheld wrote:
 On Fri, Nov 28, 2008 at 04:31:56PM +, Adam D. Barratt wrote:
 Generate a file rather than shipping it to allow us to be
 imported in to bzr
 
 May I ask who needs that? ;)
 
 Colin (Watson) requested the change in January (in a mail I'm about to 
 reply to); Russ agreed at the time, but it never got done.  I was 
 reminded of it earlier in the week as lintian is one of the packages 
 that currently fails to import in to http://package-import.ubuntu.com/
 
 I'm quite happy to revert the changes if anyone feels they're 
 inappropriate.

Nah, just curious.

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#505868: setting package to lintian, tagging 499737, tagging 505868

2008-11-28 Thread Frank Lichtenheld
# Automatically generated email from bts, devscripts version 2.10.35
# via tagpending 
#
# lintian (2.1.0) unstable; urgency=low
#
#  * checks/debhelper:
#+ [FL] Use Lintian::Data for list of debhelper commands that modify
#  maintainer scripts.  Patch by Raphael Geissert.
#+ [FL] Add new tag missing-build-dependency-for-dh_-command for
#  debhelper commands that are not from the debhelper package.
#  Patch by Raphael Geissert.
#+ [FL] Add new tag debhelper-but-no-misc-depends which warns
#  about missing misc:Depends if you use commands that might
#  set it.  Patch by Raphael Geissert.  (Closes: #499737)
#  * check/scripts:
#+ [FL] Use $known_shells_regex from common_data.
#+ [FL] Add icmake as a known interpreter as requested by
#  Frank B. Brokken.  (Closes: #505868)
#

package lintian
tags 499737 + pending
tags 505868 + pending




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-71-g26bba35

2008-11-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 26bba35a6991be6a2b039c47d1c7c9cece746d17
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Nov 28 20:12:32 2008 +0100

Disable the non-PIC library test case on non-i386

At least allow the test suite to complete on other architectures
(although not yet successfully)

diff --git a/testset/libbaz/Makefile b/testset/libbaz/Makefile
index 4a3bf2d..b388b8c 100644
--- a/testset/libbaz/Makefile
+++ b/testset/libbaz/Makefile
@@ -4,6 +4,12 @@ CC=gcc
 CFLAGS=-Wall -Winline -O2
 
 OBJS=baz.o extra.o
+SHOBJS=baz.sho extra.sho
+NOPICOBJS = $(OBJS)
+DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+ifneq ($(DEB_HOST_ARCH),i386)
+NOPICOBJS = $(SHOBJS)
+endif
 
 all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b
 
@@ -13,14 +19,14 @@ libbaz2.so.1.0: libbaz2.so.1.0.3b
ln -sf $^ $@
 
 # Oops, forget the soname altogether
-libbaz1.so.1.0.3b: $(OBJS)
+libbaz1.so.1.0.3b: $(NOPICOBJS)
$(CC) -o $@ -shared $^ -lc
 
-libbaz2.so.1.0.3b: $(OBJS:%.o=%.sho)
+libbaz2.so.1.0.3b: $(SHOBJS)
$(CC) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc
 
-# Non-PIC.
-libbaz3.so.1.0.3b: $(OBJS)
+# Non-PIC. We can't test this on all architectures
+libbaz3.so.1.0.3b: $(NOPICOBJS)
$(CC) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc
 
 #%.o-noreentrant: %.c
@@ -37,7 +43,7 @@ libbaz2.a: $(OBJS)
ranlib $@
 
 # The pic one in the .a (wrong), no archive table
-libbaz1.a: $(OBJS:%.o=%.sho)
+libbaz1.a: $(SHOBJS)
ar cqS $@ $^
 
 clean:

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker annotated tag, 2.1.0, created. 2.1.0

2008-11-28 Thread Frank Lichtenheld
The annotated tag, 2.1.0 has been created
at  1234778fb3da71d5eea357912507b6d1ca3a4ac2 (tag)
   tagging  26bba35a6991be6a2b039c47d1c7c9cece746d17 (commit)
  replaces  2.0.0
 tagged by  Frank Lichtenheld
on  Fri Nov 28 20:28:05 2008 +0100

- Shortlog 
Release 2.1.0

Adam D. Barratt (24):
  Don't try to readelf-parse files for which objdump returns invalid 
operation.
  Simplify the code structure and remove duplication.
  Don't trigger versioned-dependency-satisfied-by-perl for 
Conflicts/Replaces
  Fix typo (s/Knew/New/)
  Remove no longer used variable
  s/catched/caught/
  Don't count ## DP:  as a dpatch description.
  Don't emit unused-override in situations where we can't know it's unused
  Indicate that the patch-systems check script needs diffstat information
  Add quilt-patch-without-description (Closes: #498892)
  Don't treat literal use of ? in descriptions as part of a question.
  Add an acknowledgement for the previous change
  Only issue one of the symbols-file-contains*debian-revision tags for a 
symbol.
  Flag shlibs which call {_,}exit() (Closes: #504257)
  Drop the severity of shlib-calls-exit to wishlist
  Add quilt-patch-missing-description to the list of new patches
  Ignore square bracket delimited text when running picky spelling checks.
  Add changelog entry for Raphael Geissert's embedded PHP library updates.
  Correct a few typos in the overrides section of lintian.sgml
  s/Geshi/GeSHi/
  Generate a file rather than shipping it to allow us to be imported in to 
bzr
  Move a couple of files in the testset from diffs to being generated.
  And actually remember to delete the files
  Correct a filename

Colin Watson (2):
  [CW] Add jaunty as an allowable distribution for Ubuntu, and remove the 
EOLed edgy and feisty.
  Update my e-mail address.

Frank Lichtenheld (31):
  Unify handling of known shell names
  Lintian::Output: New module for bundeling lintian output functionality
  Begin conversion to Lintian::Output
  Do not use STDERR for debug output
  frontend/lintian: Unify warning output
  Move tag output to Lintian::Output
  Lintian::Output: Add POD documentation
  Lintian::Output: Add print_start_pkg and print_end_pkg hooks
  Add an XML output as demonstration for print_{start,end}_pkg
  Changelog entry for Lintian::Output branch
  Tags::get_tag_code: Remove unused parameter
  Remove support for old Type: field of tags
  Document the fact that --color=html is currently not supported
  Remove unnessary inclusions of the Pipeline module
  Add new module Lintian::Command as replacement of the old Pipeline module
  Migrate lib/* from Pipeline to Lintian::Command
  Util: Add some more utility functions based on Lintian::Command
  Convert most collection scripts from Pipeline to Util
  Lintian::Command::spawn: set error output to STDERR per default
  Lintian::Command::spawn: Improve error handling
  frontend/lintian: Convert to Lintian::Command and new Util
  unpack/*: Convert to Lintian::Command and Util
  Lintian::Command: Add new reap() function as wrapper for finish
  collection/{file-info,md5sums}: Replace usages of pipeline_open
  Pipeline: delete
  Add dependency on libipc-run-perl for Lintian::Command
  Add some changelog entries for my Lintian::Command branch
  checks/scripts: Add icmake as a known interpreter
  Commit the new debhelper data files
  Don't expect a removed warning anymore
  Disable the non-PIC library test case on non-i386

Raphael Geissert (12):
  Also search for embedded copies of the Snoopy PHP class/lib
  Also try to match .inc files for those renaming-lovers
  Know about the not yet packaged IXR PHP library
  Know about the not yet packaged kses PHP library
  markdown is now in sid
  Check for embedded copies of the Geshi PHP library.
  private/refresh-debhelper-data: New script to update debhelper related 
data
  checks/debhelper: Recognise debhelper commands invoked with - prefix
  checks/debhelper: Use Lintian::Data for list of debhelper commands
  checks/debhelper: rename $depends to $bdepends to make purpose clearer
  checks/debhelper: Add new tag for dependencies of additional debhelper 
commands
  checks/debhelper: Add new tag debhelper-but-no-misc-depends

Russ Allbery (2):
  Stop checking for a libmodule-build-perl build dependency
  Correct subversion to Subversion in package descriptions

---

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[Debian RT] Please install libipc-run-perl on gluck

2008-11-28 Thread Frank Lichtenheld
The new version of lintian, uploaded just now, uses libipc-run-perl,
so please install it on lintian.debian.org, i.e. gluck.

Gruesse and TIA,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.1.0-5-gc64f49e

2008-11-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit c64f49e2b86eeec0acb632ce363e8411acce3417
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Sat Nov 29 01:37:08 2008 +0100

lib/Lab.pm: Fix breakage of populate_with_dist() I introduced in 2.1.0

Another example of code that is really only used during harness.

diff --git a/debian/changelog b/debian/changelog
index bc98f49..b4362e0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,9 @@ lintian (2.1.1) unstable; urgency=low
   better match executions of the command rather than the use of its name
   in pattern matching expressions.  (Closes: #499847)
 
+  * lib/Lab.pm:
++ [FL] Fix breakage of populate_with_dist() I introduced in 2.1.0.
+  
  -- Adam D. Barratt [EMAIL PROTECTED]  Fri, 28 Nov 2008 21:47:33 +
 
 lintian (2.1.0) unstable; urgency=low
diff --git a/lib/Lab.pm b/lib/Lab.pm
index 413343f..c522782 100644
--- a/lib/Lab.pm
+++ b/lib/Lab.pm
@@ -138,7 +138,7 @@ sub populate_with_dist {
 return 0 unless $dist;
 return 0 unless $self-{dir};
 
-debug(2, spawning list-binpkg, list-udebpkg and list-srcpkg since 
LINTIAN_DIST=$dist);
+debug_msg(2, spawning list-binpkg, list-udebpkg and list-srcpkg since 
LINTIAN_DIST=$dist);
 
 my $v = $Lintian::Output::GLOBAL-verbose ? '-v' : '';
 

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#507096: lintian: should library-not-linked-against-libc exclude debug library files?

2008-11-27 Thread Frank Lichtenheld
Package: lintian
Version: 1.24.2.1
Severity: normal

http://lintian.debian.org/tags/library-not-linked-against-libc.html 
certainly seems to suggest that.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages lintian depends on:
ii  binutils2.18.1~cvs20080103-7 The GNU assembler, linker and bina
ii  diffstat1.45-2   produces graph of changes introduc
ii  dpkg-dev1.14.22  Debian package development tools
ii  file4.26-1   Determines file type using magic
ii  gettext 0.17-4   GNU Internationalization utilities
ii  intltool-debian 0.35.0+20060710.1Help i18n of RFC822 compliant conf
ii  libdigest-sha-perl  5.47-1   Perl extension for SHA-1/224/256/3
ii  libparse-debianchan 1.1.1-2  parse Debian changelogs and output
ii  libtimedate-perl1.1600-9 Time and date functions for Perl
ii  liburi-perl 1.35.dfsg.1-1Manipulates and accesses URI strin
ii  man-db  2.5.2-3  on-line manual pager
ii  perl [libdigest-sha 5.10.0-17Larry Wall's Practical Extraction 

lintian recommends no packages.

Versions of packages lintian suggests:
ii  binutils-multiarch  2.18.1~cvs20080103-7 Binary utilities that support mult
ii  libtext-template-pe 1.44-1.2 Text::Template perl module
ii  man-db  2.5.2-3  on-line manual pager

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#503695: lintian: Add support for checking empty DP:

2008-10-31 Thread Frank Lichtenheld
On Thu, Oct 30, 2008 at 06:30:37PM +, Adam D. Barratt wrote:
 On Mon, 2008-10-27 at 18:32 +0200, jaalto wrote:
  Given following debian/patches/10_example.dpatch:
  
## All lines beginning with `## DP:' are a description of the patch.
## DP: 
  
  Please add report W: for empty patch description. (likewise for DP: 
  )
 
 The tag already exists - dpatch-missing-description. It currently
 assumes that any comment starting DP: means that a description has
 been provided (so long as the comment does not contain no
 description).
 
 I can't see any reason why the check shouldn't be extended to require a
 dpatch comment line containing at least one non-space character and will
 do so unless someone can suggest a good reason.

Sounds reasonable to me.

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#501722: lintian: unused-override is emitted when an override exists for a check which is not -C check

2008-10-31 Thread Frank Lichtenheld
On Fri, Oct 31, 2008 at 06:27:54AM +, Adam D. Barratt wrote:
 By way of some examples:
 
 ocaml-compiler-libs
 ---
 
 The package includes an override for
 copyright-should-refer-to-common-license-file-for-lgpl and lintian
 issues command-with-path-in-maintainer-script.
 
 With -C scripts no unused override warning is issued, c-w-p-i-m-s is.
 With -T command-with-path-in-maintainer-script no unused override
 warning is issued, c-w-p-i-m-s is.
 
 adduser
 ---
 
 The package includes three unused overrides for
 maintainer-script-needs-depends-on-adduser and lintian issues a number
 of tags from the files and manpages check scripts.
 
 With -C scripts the unused override warning is issued; with either -C
 manpages or -C files it is not.
 
 With -T maintainer-script-needs-depends-on-adduser or -T
 unused-override, no output is produced.

I personally think the -T maintainer-script-needs-depends-on-adduser
is the borderline case. Everything else seems obviously correct.

 With -T maintainer-script-needs-depends-on-adduser,unused-override the
 unused overrides are flagged.

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Using lintian / flymake to check Debian packages?

2008-10-16 Thread Frank Lichtenheld
On Wed, Oct 15, 2008 at 08:05:23AM +0900, Junichi Uekawa wrote:
 I've been using flymake (emacs) to edit source codes, and I am getting
 more fond of the idea. I'd like to extend it to Debian files as well.
 Some kind of lint tool to output error message when there is a problem
 is required, and I am hoping to get lintian working to this end.
 
 Lintian looks like it only takes dsc / tar.gz / changes / deb files,
 and not the original source-tree. I'd probably want to run lintian
 over a specific file in the source tree with a restricted set of
 checks (i.e. running debian/control check when editing
 debian/control).
 
 
 I am envisioning getting lintian to run over:
 
   lintian -C dctl --some-option ./debian/control
 
 and it needs to run relatively quickly, since it will be invoked on
 almost every user keystroke.

With the current code structure that is pretty difficult, since there
is a relatively complex process to come to the point to execute checks:

unpack the .deb/.dsc into the lab (unpack/*)
collect information about the contents and store in the lab (collection/*)
run checks on the contents of the lab (checks/*)

The problem is that the checks are sorted into scripts more by topic
then by what they need from the lab.

So what would need to be done is to refactor the checks so that you
can separate the code parts that do not need the lab and offer a
possibility to call only those.

Definetly doable but will be a lot of work.

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-29-gac85d00

2008-10-16 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 417d5e9f96c67600e4241bd0f69ce78e6b0e3db8
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Wed Oct 8 20:43:58 2008 +0200

Remove unnessary inclusions of the Pipeline module

These scripts do not actually use any function for Pipeline.

diff --git a/lib/Checker.pm b/lib/Checker.pm
index f5336c5..33c247e 100644
--- a/lib/Checker.pm
+++ b/lib/Checker.pm
@@ -23,7 +23,6 @@ package Checker;
 use strict;
 no strict 'refs';
 
-use Pipeline;
 use Tags;
 use Cwd 'cwd';
 
diff --git a/unpack/list-binpkg b/unpack/list-binpkg
index 2b86596..37e6447 100755
--- a/unpack/list-binpkg
+++ b/unpack/list-binpkg
@@ -62,7 +62,6 @@ unless ($output_file) {
 use lib $ENV{'LINTIAN_ROOT'}/lib;
 use Read_pkglists;
 use vars qw(%binary_info $BINLIST_FORMAT); # from the above
-use Pipeline;
 use Util;
 
 # get variables out of environment
diff --git a/unpack/list-udebpkg b/unpack/list-udebpkg
index 333ecd2..c8c8659 100755
--- a/unpack/list-udebpkg
+++ b/unpack/list-udebpkg
@@ -63,7 +63,6 @@ unless ($output_file) {
 use lib $ENV{'LINTIAN_ROOT'}/lib;
 use Read_pkglists;
 use vars qw(%udeb_info $UDEBLIST_FORMAT); # from the above
-use Pipeline;
 use Util;
 
 # get variables out of environment

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-29-gac85d00

2008-10-16 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit b168bc9538702e24b754c0aa10d3a2eceb81ac30
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Wed Oct 8 20:45:07 2008 +0200

Add new module Lintian::Command as replacement of the old Pipeline module

Create this module as a wrapper around IPC::Run.

diff --git a/lib/Lintian/Command.pm b/lib/Lintian/Command.pm
new file mode 100644
index 000..c5325f9
--- /dev/null
+++ b/lib/Lintian/Command.pm
@@ -0,0 +1,213 @@
+# Copyright © 2008 Frank Lichtenheld [EMAIL PROTECTED]
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, you can find it on the World Wide
+# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+package Lintian::Command;
+use strict;
+use warnings;
+
+use base qw(Exporter);
+our @EXPORT = ();
+our @EXPORT_OK = qw(spawn);
+
+use IPC::Run qw(run harness);
+
+=head1 NAME
+
+Lintian::Command - Utilities to execute other commands from lintian code
+
+=head1 SYNOPSIS
+
+use Lintian::Command qw(spawn);
+
+# simplest possible call
+my $success = spawn({}, ['command']);
+
+# catch output
+my $opts = {};
+$success = spawn($opts, ['command']);
+if ($success) {
+   print STDOUT: $opts-{out}\n;
+   print STDERR: $opts-{err}\n;
+}
+
+# from file to file
+$opts = { in = 'infile.txt', out = 'outfile.txt' };
+$success = spawn($opts, ['command']);
+
+# piping
+$success = spawn({}, ['command'], |, ['othercommand']);
+
+=head1 DESCRIPTION
+
+Lintian::Command is a thin wrapper around IPC::Run, that catches exception
+and implements a useful default behaviour for input and output redirection.
+
+Lintian::Command provides a single function spawn() which is a wrapper
+around IPC::Run::run() resp. IPC::Run::start() (depending on whether a
+pipe is requested).
+
+=head2 Cspawn($opts, @cmds)
+
+The @cmds array is given to IPC::Run::run() (or ::start()) unaltered, but
+should only be used for commands and piping symbols (i.e. all of the elements
+should be either an array reference, a code reference, '|', or '').  I/O
+redirection is handled via the $opts hash reference. If you need more fine
+grained control than that, you should just use IPC::Run directly.
+
+$opts is a hash reference which can be used to set options and to retrieve
+the status and output of the command executed.
+
+The following hash keys can be set to alter the behaviour of spawn():
+
+=over 4
+
+=item in
+
+STDIN for the first forked child.  Defaults to C\undef.
+
+=item pipe_in
+
+Use a pipe for STDIN and start the process in the background.
+You will need to close the pipe after use and call $opts-{harness}-finish
+in order for the started process to end properly.
+
+=item out
+
+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 pipe_out
+
+Use a pipe for STDOUT and start the process in the background.
+You will need to call $opts-{harness}-finish in order for the started
+process to end properly.
+
+=item err
+
+STDERR of all forked childs.  Will be set to a newly created
+scalar reference by default which can be used to retrieve the output
+after the call.
+
+=item pipe_err
+
+Use a pipe for STDERR and start the process in the background.
+You will need to call $opts-{harness}-finish in order for the started
+process to end properly.
+
+=back
+
+The following additional keys will be set during the execution of spawn():
+
+=over 4
+
+=item harness
+
+Will contain the IPC::Run object used for the call which can be used to
+query the exit values of the forked programs (E.g. with results() and
+full_results()) and to wait for processes started in the background.
+
+=item exception
+
+If an exception is raised during the execution of the commands, it
+will be catched and stored under this key.
+
+=item success
+
+Will contain the return value of spawn().
+
+=back
+
+=cut
+
+sub spawn {
+my ($opts, @cmds) = @_;
+
+my $fail_on_error;
+if (ref($opts) ne 'HASH') {
+   $opts = {};
+   $fail_on_error = 1;
+}
+
+my ($out, $err, $pipe);
+my (@out, @in, @err);
+if ($opts-{pipe_in}) {
+   @in = ('pipe', $opts-{pipe_in});
+   $pipe = 1;
+} else {
+   $opts-{in} ||= \undef;
+   @in = ('', $opts

[SCM] Debian package checker branch, master, updated. 2.0.0-29-gac85d00

2008-10-16 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 70ebda71e67e603070678d301753bc40c3c307c4
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Wed Oct 8 20:55:30 2008 +0200

Util: Add some more utility functions based on Lintian::Command

delete_dir is a shorthand for 'rm -fr'
copy_dir is a shorthand for 'cp -a'
touch_file is Lab::_touch moved to Util
gunzip_file is a shorthand for 'gzip -dc'

All these are used repeatedly in collection scripts.

diff --git a/lib/Lab.pm b/lib/Lab.pm
index 8bf8184..413343f 100644
--- a/lib/Lab.pm
+++ b/lib/Lab.pm
@@ -120,7 +120,7 @@ sub setup_force {
 # can analyze what changed.
 for my $pkgtype (qw( binary source udeb )) {
if (not -f $dir/info/$pkgtype-packages) {
-   _touch($dir/info/$pkgtype-packages)
+   touch_file($dir/info/$pkgtype-packages)
or fail(cannot create $pkgtype package list);
}
 }
@@ -214,11 +214,10 @@ sub delete_force {
 }
 
 # looks ok.
-unless (spawn(undef, ['rm', '-rf', '--',
- $self-{dir}/binary,
- $self-{dir}/source,
- $self-{dir}/udeb,
- $self-{dir}/info])) {
+unless (delete_dir($self-{dir}/binary,
+  $self-{dir}/source,
+  $self-{dir}/udeb,
+  $self-{dir}/info)) {
warning(cannot remove lab directory $self-{dir} (please 
remove it yourself));
 }
 
@@ -234,16 +233,6 @@ sub delete_force {
 return 1;
 }
 
-# create an empty file
-# --okay, okay, this is not exactly what `touch' does :-)
-sub _touch {
-open(T, '', $_[0]) or return 0;
-close(T) or return 0;
-
-return 1;
-}
-
-
 1;
 
 # vim: ts=4 sw=4 noet
diff --git a/lib/Util.pm b/lib/Util.pm
index 0b8f91d..fd5d4f9 100644
--- a/lib/Util.pm
+++ b/lib/Util.pm
@@ -33,6 +33,10 @@ our @EXPORT = qw(parse_dpkg_control
file_is_encoded_in_non_utf8
fail
system_env
+   delete_dir
+   copy_dir
+   gunzip_file
+   touch_file
perm2oct);
 
 use FileHandle;
@@ -258,7 +262,30 @@ sub perm2oct {
 return $o;
 }
 
-# 
+
+sub delete_dir {
+return spawn(undef, ['rm', '-rf', '--', @_]);
+}
+
+sub copy_dir {
+return spawn(undef, ['cp', '-a', '--', @_]);
+}
+
+sub gunzip_file {
+my ($in, $out) = @_;
+spawn({out = $out},
+ ['gzip', '-dc', $in])
+   or fail(error in gzip);
+}
+
+# create an empty file
+# --okay, okay, this is not exactly what `touch' does :-)
+sub touch_file {
+open(T, '', $_[0]) or return 0;
+close(T) or return 0;
+
+return 1;
+}
 
 sub fail {
 my $str;

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-29-gac85d00

2008-10-16 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 611c9e3fcf9b64edc90c35241d31bc526ca4acef
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Oct 17 00:16:28 2008 +0200

Lintian::Command::spawn: set error output to STDERR per default

From my own experience during testing, this really should only be
hidden if the caller is prepared to do something with it.

diff --git a/lib/Lintian/Command.pm b/lib/Lintian/Command.pm
index c5325f9..6fb2071 100644
--- a/lib/Lintian/Command.pm
+++ b/lib/Lintian/Command.pm
@@ -100,9 +100,7 @@ process to end properly.
 
 =item err
 
-STDERR of all forked childs.  Will be set to a newly created
-scalar reference by default which can be used to retrieve the output
-after the call.
+STDERR of all forked childs.  Defaults to STDERR of the parent.
 
 =item pipe_err
 
@@ -164,7 +162,7 @@ sub spawn {
@err = ('2pipe', $opts-{pipe_err});
$pipe = 1;
 } else {
-   $opts-{err} ||= \$err;
+   $opts-{err} ||= \*STDERR;
@err = ('2', $opts-{err});
 }
 

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-29-gac85d00

2008-10-16 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 4f833eb616f2def3bd158ac00450dd43c8ddf7d8
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Wed Oct 8 21:04:05 2008 +0200

Convert most collection scripts from Pipeline to Util

Most old uses of Pipeline are covered by the new functions in Util.

diff --git a/collection/changelog-file b/collection/changelog-file
index 71ff88e..4e3b03d 100755
--- a/collection/changelog-file
+++ b/collection/changelog-file
@@ -21,6 +21,9 @@
 
 use strict;
 
+use lib $ENV{'LINTIAN_ROOT'}/lib;
+use Util;
+
 ($#ARGV == 1) or fail(syntax: changelog-file pkg type);
 my $pkg = shift;
 my $type = shift;
@@ -75,11 +78,7 @@ if (defined ($chl)  -l $chl) {
 if (not defined $chl) {
 # no changelog found
 } elsif ($chl =~ /\.gz$/) {
-use lib $ENV{'LINTIAN_ROOT'}/lib;
-use Pipeline;
-
-pipeline((sub { exec 'gzip', '-dc', $chl }), changelog) == 0
-   or fail(error in gzip);
+gunzip_file($chl, 'changelog');
 } elsif (-f $chl  -l $chl) {
 local $_;
 open (CHL, '', $chl) or fail(cannot open $chl: $!);
@@ -105,25 +104,6 @@ if (-f $news) {
 }
 }
 if ($news) {
-use lib $ENV{'LINTIAN_ROOT'}/lib;
-use Pipeline;
-
-pipeline((sub { exec 'gzip', '-dc', $news }), NEWS.Debian) == 0
-or fail(error in gzip);
-}
-}
-
-exit 0;
-
-# ---
-
-sub fail {
-if ($_[0]) {
-print STDERR internal error: $_[0]\n;
-} elsif ($!) {
-print STDERR internal error: $!\n;
-} else {
-print STDERR internal error.\n;
+   gunzip_file($news, NEWS.Debian);
 }
-exit 1;
 }
diff --git a/collection/copyright-file b/collection/copyright-file
index 0146dad..efd474b 100755
--- a/collection/copyright-file
+++ b/collection/copyright-file
@@ -21,6 +21,9 @@
 
 use strict;
 
+use lib $ENV{'LINTIAN_ROOT'}/lib;
+use Util;
+
 ($#ARGV == 1) or fail(syntax: copyright-file pkg type);
 my $pkg = shift;
 my $type = shift;
@@ -40,28 +43,8 @@ if (-f $file) {
 link($file, copyright)
or fail(cannot link $file to copyright: $!);
 } elsif (-f $file.gz) {
-use lib $ENV{'LINTIAN_ROOT'}/lib;
-use Pipeline;
-
-pipeline((sub { exec 'gzip', '-dc', $file }), copyright) == 0
-   or fail(error in gzip);
+gunzip_file($file, 'copyright');
 } else {
 # no copyright file found
-open(DUMMY, copyright);
-close(DUMMY);
-}
-
-exit 0;
-
-# ---
-
-sub fail {
-if ($_[0]) {
-print STDERR internal error: $_[0]\n;
-} elsif ($!) {
-print STDERR internal error: $!\n;
-} else {
-print STDERR internal error.\n;
-}
-exit 1;
+touch_file('copyright');
 }
diff --git a/collection/debfiles b/collection/debfiles
index b443caa..a7664d9 100755
--- a/collection/debfiles
+++ b/collection/debfiles
@@ -28,10 +28,10 @@ my $type = shift;
 -e unpacked or fail(debfiles invoked in wrong directory);
 
 use lib $ENV{'LINTIAN_ROOT'}/lib;
-use Pipeline;
+use Util;
 
 if (-e debfiles) {
-spawn('rm', '-rf', 'debfiles') == 0
+delete_dir('debfiles')
or fail(cannot rm old debfiles directory);
 }
 
@@ -42,22 +42,7 @@ opendir(DEBIAN, 'unpacked/debian')
or fail(cannot open unpacked/debian/ directory: $!);
 while (my $file=readdir(DEBIAN)) {
next if -d $file;
-   spawn('cp', '-a', unpacked/debian/$file, 'debfiles/') == 0
+   copy_dir(unpacked/debian/$file, 'debfiles/')
or fail(cannot copy unpacked/debian/$file: $!);
 }
 closedir(DEBIAN);
-
-exit 0;
-
-# ---
-
-sub fail {
-if ($_[0]) {
-print STDERR internal error: $_[0]\n;
-} elsif ($!) {
-print STDERR internal error: $!\n;
-} else {
-print STDERR internal error.\n;
-}
-exit 1;
-}
diff --git a/collection/debian-readme b/collection/debian-readme
index 364d496..b82b555 100755
--- a/collection/debian-readme
+++ b/collection/debian-readme
@@ -21,6 +21,9 @@
 
 use strict;
 
+use lib $ENV{'LINTIAN_ROOT'}/lib;
+use Util;
+
 ($#ARGV == 1) or fail(syntax: debian-readme pkg type);
 my $pkg = shift;
 my $type = shift;
@@ -34,7 +37,7 @@ my @readmes = (unpacked/usr/share/doc/$pkg/README.Debian.gz,
unpacked/usr/share/doc/$pkg/README.Debian,
unpacked/usr/share/doc/$pkg/README.debian.gz,
unpacked/usr/share/doc/$pkg/README.debian,
-unpacked/usr/doc/$pkg/README.Debian.gz,
+   unpacked/usr/doc/$pkg/README.Debian.gz,
unpacked/usr/doc/$pkg/README.Debian,
unpacked/usr/doc/$pkg/README.debian.gz,
unpacked/usr/doc/$pkg/README.debian);
@@ -49,30 +52,10 @@ for (@readmes) {
 
 if (not defined $file) {
 # no README found
-open(DUMMY, '', README.Debian);
-close(DUMMY);
+touch_file(README.Debian);
 } elsif ($file =~ m/\.gz$/) {
-use lib $ENV{'LINTIAN_ROOT'}/lib;
-use Pipeline;
-
-pipeline((sub { exec 'gzip', '-dc', $file

[SCM] Debian package checker branch, master, updated. 2.0.0-29-gac85d00

2008-10-16 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 613560cd7a4439af886644965088ada676910412
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Oct 17 00:21:31 2008 +0200

frontend/lintian: Convert to Lintian::Command and new Util

diff --git a/frontend/lintian b/frontend/lintian
index 57ccc41..2e33ff0 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -625,11 +625,9 @@ unshift @INC, $LINTIAN_ROOT/lib;
 require Lab;
 
 require Util;
-require Pipeline;
 require Read_pkglists;
 
 import Util;
-import Pipeline;
 
 require Tags;
 import Tags;
@@ -637,6 +635,8 @@ import Tags;
 require Lintian::Schedule;
 require Lintian::Output;
 import Lintian::Output qw(:messages);
+require Lintian::Command;
+import Lintian::Command qw(spawn);
 
 no warnings 'once';
 if (defined $experimental_output_opts) {
@@ -1463,7 +1463,7 @@ foreach my $pkg_info ($schedule-get_all) {
# collect info
remove_status_file($base);
debug_msg(1, Collecting info: $coll ...);
-   if (spawn($LINTIAN_ROOT/collection/$ci-{'script'}, $pkg, 
$long_type) != 0) {
+   unless (spawn({}, [$LINTIAN_ROOT/collection/$ci-{'script'}, 
$pkg, $long_type])) {
warning(collect info $coll about package $pkg: $?,
skipping $action of $long_type package $pkg);
$exit_code = 2;
@@ -1662,10 +1662,10 @@ sub unpack_pkg {
# create new directory
debug_msg(1, Unpacking package to level 1 ...);
if (($type eq 'b') || ($type eq 'u')) {
-   spawn($LINTIAN_ROOT/unpack/unpack-binpkg-l1, $base, $file) == 0
+   spawn({}, [$LINTIAN_ROOT/unpack/unpack-binpkg-l1, $base, $file])
or return -1;
} else {
-   spawn($LINTIAN_ROOT/unpack/unpack-srcpkg-l1, $base, $file) == 0
+   spawn({}, [$LINTIAN_ROOT/unpack/unpack-srcpkg-l1, $base, $file])
or return -1;
}
$cur_level = 1;
@@ -1676,11 +1676,11 @@ sub unpack_pkg {
# unpack package contents
debug_msg(1, Unpacking package to level 2 ...);
if (($type eq 'b') || ($type eq 'u')) {
-   spawn($LINTIAN_ROOT/unpack/unpack-binpkg-l2, $base) == 0
+   spawn({}, [$LINTIAN_ROOT/unpack/unpack-binpkg-l2, $base])
or return -1;
} else {
debug_msg(1, $LINTIAN_ROOT/unpack/unpack-srcpkg-l2 $base);
-   spawn($LINTIAN_ROOT/unpack/unpack-srcpkg-l2, $base) == 0
+   spawn({}, [$LINTIAN_ROOT/unpack/unpack-srcpkg-l2, $base])
or return -1;
}
$cur_level = 2;
@@ -1709,11 +1709,11 @@ sub clean_pkg {
# remove unpacked/ directory
debug_msg(1, Decreasing unpack level to 1 (removing files) ...);
if ( -l $base/unpacked ) {
-   spawn('rm', '-rf', '--', $base/.readlink( $base/unpacked )) == 0
+   delete_dir($base/.readlink($base/unpacked))
or return -1;
-   spawn('rm', '-rf', '--', $base/unpacked) == 0 or return -1;
+   delete_dir($base/unpacked) or return -1;
} else {
-   spawn('rm', '-rf', '--', $base/unpacked) == 0 or return -1;
+   delete_dir($base/unpacked) or return -1;
}
 
$cur_level = 1;
@@ -1727,7 +1727,7 @@ sub remove_pkg {
 my ($base) = @_;
 
 debug_msg(1, Removing package in lab ...);
-if (spawn('rm', '-rf', '--', $base) != 0) {
+unless (delete_dir($base)) {
warning(cannot remove directory $base: $!);
return 0;
 }

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-29-gac85d00

2008-10-16 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit e11275d03869a4373c3cae8c7f951a84287581a6
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Oct 17 00:19:44 2008 +0200

Lintian::Command::spawn: Improve error handling

Define error handling with the opts-{fail} key. Possible values
are 'never', 'exception', 'error'.

diff --git a/lib/Lintian/Command.pm b/lib/Lintian/Command.pm
index 6fb2071..bc97b5d 100644
--- a/lib/Lintian/Command.pm
+++ b/lib/Lintian/Command.pm
@@ -108,6 +108,15 @@ Use a pipe for STDERR and start the process in the 
background.
 You will need to call $opts-{harness}-finish in order for the started
 process to end properly.
 
+=item fail
+
+Configures the behaviour in case of errors. The default is 'exception',
+which will cause spawn() to die in case of exceptions thrown by IPC::Run.
+If set to 'error' instead, it will also die if the command exits
+with a non-zero error code.  If exceptions should be handled by the caller,
+setting it to 'never' will cause it to store the exception in the
+Cexception key instead.
+
 =back
 
 The following additional keys will be set during the execution of spawn():
@@ -122,8 +131,9 @@ full_results()) and to wait for processes started in the 
background.
 
 =item exception
 
-If an exception is raised during the execution of the commands, it
-will be catched and stored under this key.
+If an exception is raised during the execution of the commands,
+and if Cfail is set to 'never', the exception will be catched and
+stored under this key.
 
 =item success
 
@@ -136,13 +146,12 @@ Will contain the return value of spawn().
 sub spawn {
 my ($opts, @cmds) = @_;
 
-my $fail_on_error;
 if (ref($opts) ne 'HASH') {
$opts = {};
-   $fail_on_error = 1;
 }
+$opts-{fail} ||= 'exception';
 
-my ($out, $err, $pipe);
+my ($out, $pipe);
 my (@out, @in, @err);
 if ($opts-{pipe_in}) {
@in = ('pipe', $opts-{pipe_in});
@@ -184,9 +193,22 @@ sub spawn {
 };
 if ($@) {
require Util;
-   Util::fail($@) if $fail_on_error;
+   Util::fail($@) if $opts-{fail} ne 'never';
$opts-{success} = 0;
$opts-{exception} = $@;
+} elsif ($opts-{fail} eq 'error'
+and !$opts-{success}) {
+   require Util;
+   if ($opts-{description}) {
+   Util::fail($opts-{description} failed with error code .
+  $opts-{harness}-result);
+   } elsif (@cmds == 1) {
+   Util::fail($cmds[0][0] failed with error code .
+  $opts-{harness}-result);
+   } else {
+   Util::fail(command failed with error code .
+  $opts-{harness}-result);
+   }
 }
 #print STDERR Dumper($opts, [EMAIL PROTECTED]);
 return $opts-{success};
diff --git a/lib/Util.pm b/lib/Util.pm
index fd5d4f9..aa29c76 100644
--- a/lib/Util.pm
+++ b/lib/Util.pm
@@ -273,9 +273,8 @@ sub copy_dir {
 
 sub gunzip_file {
 my ($in, $out) = @_;
-spawn({out = $out},
- ['gzip', '-dc', $in])
-   or fail(error in gzip);
+spawn({out = $out, fail = 'error'},
+ ['gzip', '-dc', $in]);
 }
 
 # create an empty file

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-29-gac85d00

2008-10-16 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 8f2cb8be58b0509fa82fe42905f2fc264a47f991
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Oct 17 00:37:48 2008 +0200

collection/{file-info,md5sums}: Replace usages of pipeline_open

These are the only places where we actually use the pipe_* options
and reap().

diff --git a/collection/file-info b/collection/file-info
index df58bc4..4ca3718 100755
--- a/collection/file-info
+++ b/collection/file-info
@@ -21,6 +21,11 @@
 
 use strict;
 
+use FileHandle;
+use lib $ENV{'LINTIAN_ROOT'}/lib;
+use Util;
+use Lintian::Command qw(spawn reap);
+
 ($#ARGV == 1) or fail(syntax: file-info pkg type);
 my $pkg = shift;
 my $type = shift;
@@ -31,13 +36,12 @@ unlink(file-info);
 chdir(unpacked)
 or fail(cannot chdir to unpacked directory: $!);
 
-use FileHandle;
-use lib $ENV{'LINTIAN_ROOT'}/lib;
-use Pipeline;
 
 my $XARGS=FileHandle-new;
-pipeline_open($XARGS, (sub { exec 'xargs', '-0r', 'file' }), ../file-info)
-or fail(cannot fork: $!);
+my %opts = ( pipe_in = FileHandle-new,
+out = '../file-info',
+fail = 'error' );
+spawn(\%opts, ['xargs', '-0r', 'file']);
 open(INDEX, '', ../index)
 or fail(cannot open index file: $!);
 while (INDEX) {
@@ -47,23 +51,9 @@ while (INDEX) {
 s/ - .*//;
 s/(\G|[^\\](?:)*)\\(\d{3})/$1 . chr(oct $2)/ge;
 s//\\/;
-printf $XARGS %s\0, $_;
+printf {$opts{pipe_in}} %s\0, $_;
 }
 close(INDEX);
 
-close($XARGS) or fail(xargs for file exited with code $?);
-
-exit 0;
-
-# ---
-
-sub fail {
-if ($_[0]) {
-print STDERR internal error: $_[0]\n;
-} elsif ($!) {
-print STDERR internal error: $!\n;
-} else {
-print STDERR internal error.\n;
-}
-exit 1;
-}
+close $opts{pipe_in};
+reap(\%opts);
diff --git a/collection/md5sums b/collection/md5sums
index 7174bf2..f4e9339 100755
--- a/collection/md5sums
+++ b/collection/md5sums
@@ -21,6 +21,11 @@
 
 use strict;
 
+use FileHandle;
+use lib $ENV{'LINTIAN_ROOT'}/lib;
+use Lintian::Command qw(spawn reap);
+use Util;
+
 ($#ARGV == 1) or fail(syntax: md5sums pkg type);
 my $pkg = shift;
 my $type = shift;
@@ -31,13 +36,10 @@ unlink(md5sums);
 chdir(unpacked)
 or fail(cannot chdir to unpacked directory: $!);
 
-use FileHandle;
-use lib $ENV{'LINTIAN_ROOT'}/lib;
-use Pipeline;
-
-my $XARGS=FileHandle-new;
-pipeline_open($XARGS, (sub { exec 'xargs', '-0r', 'md5sum' }), ../md5sums)
-or fail(cannot fork: $!);
+my %opts = ( pipe_in = FileHandle-new,
+out = '../md5sums',
+fail = 'error' );
+spawn(\%opts, ['xargs', '-0r', 'md5sum'] );
 open(INDEX, '', ../index)
 or fail(cannot open index file: $!);
 while (INDEX) {
@@ -47,23 +49,10 @@ while (INDEX) {
 s/ link to .*//;
 s/\\(\d+)/chr(oct($1))/eg;
 s//\\/g;
-printf $XARGS %s\0, $_;
+printf {$opts{pipe_in}} %s\0, $_;
 }
 close(INDEX);
 
-close($XARGS) or fail(xargs for md5sum exited with code $?);
-
-exit 0;
+close $opts{pipe_in};
+reap(\%opts);
 
-# ---
-
-sub fail {
-if ($_[0]) {
-print STDERR internal error: $_[0]\n;
-} elsif ($!) {
-print STDERR internal error: $!\n;
-} else {
-print STDERR internal error.\n;
-}
-exit 1;
-}

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-29-gac85d00

2008-10-16 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 0600fed3da48cc6ffeb1c905044e29c2f7c70ecd
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Oct 17 00:22:32 2008 +0200

unpack/*: Convert to Lintian::Command and Util

diff --git a/unpack/unpack-binpkg-l1 b/unpack/unpack-binpkg-l1
index b2d8e6c..d555c76 100755
--- a/unpack/unpack-binpkg-l1
+++ b/unpack/unpack-binpkg-l1
@@ -32,8 +32,8 @@ my $file = shift;
 
 # import perl libraries
 use lib $ENV{'LINTIAN_ROOT'}/lib;
-use Pipeline;
 use Util;
+use Lintian::Command qw(spawn);
 
 # stat $file
 (my @stat = stat $file) or fail($file: cannot stat: $!);
@@ -49,45 +49,41 @@ symlink($file,$base_dir/deb) or fail(symlink: $!);
 
 # (replaces dpkg-deb -e)
 # extract control files' tarball
-pipeline((sub { exec 'ar', 'p', $file, 'control.tar.gz' }),
-(sub { exec 'gzip', '-dc' }),
-$base_dir/control.tar) == 0
-or fail();
+spawn({ fail = 'error', out = $base_dir/control.tar },
+  ['ar', 'p', $file, 'control.tar.gz'],
+  '|', ['gzip', '-dc']);
 
 # extract the tarball's contents
-spawn(tar, xf, $base_dir/control.tar, -C, $base_dir/control) == 0
-or fail();
+spawn({ fail ='error' },
+  [tar, xf, $base_dir/control.tar, -C, $base_dir/control]);
 
 # create index of control.tar.gz
-pipeline((sub { exec tar, tvf, $base_dir/control.tar }),
-(sub { exec sort, -k, 6 }),
-$base_dir/control-index) == 0
-or fail();
+spawn({ fail = 'error', out = $base_dir/control-index },
+  [tar, tvf, $base_dir/control.tar],
+  '|', [sort, -k, 6]);
 
 # clean up control.tar
 unlink($base_dir/control.tar) or fail();
 
 # fix permissions
-spawn(chmod, -R, u+rX,o-w, $base_dir/control) == 0
-or fail();
+spawn({ fail = 'error' },
+  [chmod, -R, u+rX,o-w, $base_dir/control]);
 
 # (replaces dpkg-deb -c)
 # create index file for package
-pipeline((sub { exec dpkg-deb, --fsys-tarfile, $file }),
-(sub { exec tar, tfv, - }),
-(sub { exec sed, -e, s/^h/-/ }),
-(sub { exec sort, -k, 6 }),
-$base_dir/index) == 0
-or fail();
+spawn({ fail = 'error', out = $base_dir/index },
+  [dpkg-deb, --fsys-tarfile, $file ],
+  '|', [tar, tfv, -],
+  '|', [sed, -e, s/^h/-/],
+  '|', [sort, -k, 6]);
 
 # (replaces dpkg-deb -c)
 # create index file for package with owner IDs instead of names
-pipeline((sub { exec dpkg-deb, --fsys-tarfile, $file }),
-(sub { exec tar, --numeric-owner, -tvf, - }),
-(sub { exec sed, -e, s/^h/-/ }),
-(sub { exec sort, -k, 6 }),
-$base_dir/index-owner-id) == 0
-or fail();
+spawn({ fail = 'error', out = $base_dir/index-owner-id },
+  [dpkg-deb, --fsys-tarfile, $file],
+  '|', [tar, --numeric-owner, -tvf, -],
+  '|', [sed, -e, s/^h/-/],
+  '|', [sort, -k, 6]);
 
 # get package control information
 my $data = (read_dpkg_control($base_dir/control/control))[0];
diff --git a/unpack/unpack-binpkg-l2 b/unpack/unpack-binpkg-l2
index 1b42604..2b04df1 100755
--- a/unpack/unpack-binpkg-l2
+++ b/unpack/unpack-binpkg-l2
@@ -28,7 +28,8 @@ use vars qw($verbose);
 my $base_dir = shift;
 
 use lib $ENV{'LINTIAN_ROOT'}/lib;
-use Pipeline;
+use Lintian::Command qw(spawn);
+use Util;
 
 print N: Unpacking binary packages in directory $base_dir ...\n if $verbose;
 mkdir($base_dir/unpacked, 0777) or fail();
@@ -37,24 +38,10 @@ mkdir($base_dir/unpacked, 0777) or fail();
 # improvement on large debs, and factor 1.5 on small debs.  I heard
 # it's because dpkg-deb syncs while writing.  -- Richard
 
-pipeline((sub { exec 'dpkg-deb', '--fsys-tarfile', $base_dir/deb }),
-(sub { exec 'tar', 'xf', '-', '-C', $base_dir/unpacked })) == 0
-or fail();
+spawn({ fail = 'error' },
+  ['dpkg-deb', '--fsys-tarfile', $base_dir/deb],
+  '|', ['tar', 'xf', '-', '-C', $base_dir/unpacked]);
 
 # fix permissions
-spawn('chmod', '-R', 'u+rwX,go-w', $base_dir/unpacked) == 0 or fail();
-
-exit 0;
-
-# ---
-
-sub fail {
-  if ($_[0]) {
-print STDERR internal error: $_[0]\n;
-  } elsif ($!) {
-print STDERR internal error: $!\n;
-  } else {
-print STDERR internal error.\n;
-  }
-  exit 1;
-}
+spawn({ fail = 'error' },
+  ['chmod', '-R', 'u+rwX,go-w', $base_dir/unpacked]);
diff --git a/unpack/unpack-srcpkg-l2 b/unpack/unpack-srcpkg-l2
index 7316e6a..9e2c995 100755
--- a/unpack/unpack-srcpkg-l2
+++ b/unpack/unpack-srcpkg-l2
@@ -23,10 +23,10 @@
 
 use strict;
 use vars qw($verbose);
-use FileHandle;
 
 use lib $ENV{'LINTIAN_ROOT'}/lib;
-use Pipeline;
+use Lintian::Command qw(spawn);
+use Util;
 
 ($#ARGV == 0) or fail(syntax: unpack-srcpkg-l2 base-dir);
 my $base_dir = shift;
@@ -34,39 +34,14 @@ my $base_dir = shift;
 print N: Unpacking source package in directory $base_dir ...\n if $verbose;
 chdir($base_dir);
 
-# We can't use spawn yet because older versions of dpkg-source print things
-# out even with -q.  This can be fixed to use spawn once that newer version of
-# dpkg is in oldstable

[SCM] Debian package checker branch, master, updated. 2.0.0-29-gac85d00

2008-10-16 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit ac85d00af0ac22208a32819c327f95bb539e761b
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Oct 17 00:39:47 2008 +0200

Pipeline: delete

The last users are gone now.

diff --git a/lib/Pipeline.pm b/lib/Pipeline.pm
deleted file mode 100644
index 422213c..000
--- a/lib/Pipeline.pm
+++ /dev/null
@@ -1,143 +0,0 @@
-# -*- perl -*-
-# Pipeline -- library of process spawn functions that do not invoke a shell
-
-# Copyright (C) 1998 Richard Braakman
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, you can find it on the World Wide
-# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301, USA.
-
-package Pipeline;
-use strict;
-
-use Exporter;
-our @ISA = qw(Exporter);
-our @EXPORT = qw(spawn pipeline pipeline_open pipeline_pure);
-
-use Fcntl;
-
-
-# This is used to avoid END blocks and such, when exiting from
-# children that have not execed.
-use POSIX;
-sub immediate_exit { POSIX::_exit($_[0] + 0); }
-
-# The pipeline function takes a list of coderefs, which are forked off
-# as processes.  The stdout of each is connected to the stdin of the
-# next.
-
-# The coderefs will usually be 'exec' calls.  If the code does return,
-# the process will exit with the return value of that code.  That way
-# you don't have to check if the exec succeeded.
-#
-# Use an explicit exit statement if you don't want this.
-
-# The first list element may be a filename instead of a coderef, in which
-# case it will be opened as stdin for the first process.
-# The last list element may also be a filename instead of a coderef, in
-# which case it will be opened as stdout for the last process.
-
-# pipeline() returns the exit value of the last process in the pipe,
-# or 255 if the exec failed.
-
-sub pipeline {
-my $i;
-my $pid = fork();
-defined $pid or return 255;
-
-if (not $pid) {# child
-   sysopen(STDIN, shift, O_RDONLY)
-   or fail($$: cannot redirect input: $!)
-   unless ref($_[0]) eq CODE;
-   sysopen(STDOUT, pop, O_WRONLY|O_CREAT|O_TRUNC)
-   or fail($$: cannot redirect output: $!)
-   unless ref($_[$#_]) eq CODE;
-
-   # Perhaps I should submit this to the obfuscated perl contest.
-   $i = @_ or immediate_exit 0;
-   $pid = open(STDIN, -|) while $pid == 0 and --$i;
-   defined $pid or fail(cannot fork: $!);
-   immediate_exit int({$_[$i]});
-} else {   # parent
-   waitpid($pid, 0);
-   return $?;
-}
-}
-
-# pipeline_open is just like pipeline, except that it takes a filehandle
-# as its first argument, and cannot take both an input filename and
-# an output filename.  It connects the filehandle to stdout of the
-# last process if no output filename is given, and connects it to
-# stdin of the first process otherwise.  (Be sure to handle SIGPIPE
-# if you do the latter).
-# pipeline_open() returns the pid of the child process, or undef if it failed.
-
-sub pipeline_open (*@) {
-my ($i, $pid);
-if (ref($_[$#_]) eq CODE) {
-   $pid = open(shift, -|);
-} else {
-   $pid = open(shift, |-);
-}
-defined $pid or return undef;
-
-if (not $pid) {# child
-   sysopen(STDIN, shift, O_RDONLY)
-   or fail($$: cannot redirect input: $!)
-   unless ref($_[0]) eq CODE;
-   sysopen(STDOUT, pop, O_WRONLY|O_CREAT|O_TRUNC)
-   or fail($$: cannot redirect output: $!)
-   unless ref($_[$#_]) eq CODE;
-
-   $i = @_ or immediate_exit 0;
-   $pid = open(STDIN, -|) while $pid == 0 and --$i;
-   defined $pid or fail(cannot fork: $!);
-   immediate_exit int({$_[$i]});
-}
-# parent does nothing
-return $pid;
-}
-
-# Fork off a single process that immediately execs.  It has a simpler
-# calling syntax than pipeline() with only one argument.
-
-# It returns the exit code of the execed process, or 255 if the
-# fork or exec failed.
-
-sub spawn {
-my $pid = fork();
-defined $pid or return 255;
-
-if (not $pid) {# child
-   exec @_ or immediate_exit 255;
-} else {
-   waitpid($pid, 0);
-   return $?;
-}
-}
-
-# This is just an experiment to see if the loop alone is useful.
-# It looks like it isn't.
-#sub pipeline_pure {
-#my $pid

[SCM] Debian package checker branch, master, updated. 2.0.0-31-gafc8259

2008-10-16 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 5cfddaf9e8f85165b10139ae68b798a9e6abb042
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Oct 17 00:51:59 2008 +0200

Add dependency on libipc-run-perl for Lintian::Command

diff --git a/debian/control b/debian/control
index 53f4598..847138c 100644
--- a/debian/control
+++ b/debian/control
@@ -18,7 +18,7 @@ Architecture: all
 Depends: perl, libdigest-md5-perl | perl ( 5.8), dpkg-dev (= 1.13.17),
  file, binutils, diffstat (= 1.27-1), man-db (= 2.3.20-1), gettext (= 0.16),
  intltool-debian, libdigest-sha-perl, libparse-debianchangelog-perl (= 0.6),
- libtimedate-perl, liburi-perl
+ libtimedate-perl, liburi-perl, libipc-run-perl
 Suggests: binutils-multiarch, libtext-template-perl, man-db (= 2.5.1-1)
 Description: Debian package checker
  Lintian dissects Debian packages and reports bugs and policy

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-31-gafc8259

2008-10-16 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit afc8259ab4cc555ad3d51bfb9aacac43461e52ed
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Oct 17 00:52:18 2008 +0200

Add some changelog entries for my Lintian::Command branch

diff --git a/debian/changelog b/debian/changelog
index fc861bd..6fdae0e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,6 +21,9 @@ lintian (2.1.0) unstable; urgency=low
   operation, the output of etch's readelf is not particularly useful
   and it's easier to simply let the checks scripts handle the objdump
   output.
+  
+  * debian/control:
++ [FL] Add dependency on libipc-run-perl for Lintian::Command.
 
   * frontend/lintian:
 + [FL] Convert to use Lintian::Output.
@@ -32,13 +35,20 @@ lintian (2.1.0) unstable; urgency=low
   Lintian::Output.
   * lib/Lintian/Output/XML.pm:
 + [FL] New experimental output format.
+  * lib/Lintian/Command:
++ [FL] New utility module as a replacement for Pipeline. Provides
+  a convenient wrapper around IPC::Run.
   
   * lib/Lab.pm:
 + [FL] Convert to use Lintian::Output.
   * lib/Tags.pm:
 + [FL] Convert to use Lintian::Output.
+  * lib/Pipeline.pm:
++ [FL] Remove, replaced by Lintian::Command.
   * lib/Util.pm:
 + [FL] Convert to use Lintian::Output.
++ [FL] Add some new utility functions: delete_dir copy_dir gunzip_file
+  touch_file.
 
  -- Frank Lichtenheld [EMAIL PROTECTED]  Sun, 28 Sep 2008 10:35:47 +0200
 

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Upload and Blog-Post

2008-09-29 Thread Frank Lichtenheld
On Sun, Sep 28, 2008 at 07:12:41PM +0100, Adam D. Barratt wrote:
 On Wed, 2008-09-24 at 10:56 +0200, Frank Lichtenheld wrote:
  On Mon, Sep 22, 2008 at 01:20:58AM +0200, Frank Lichtenheld wrote:
   I've uploaded an rc2 to experimental. I hope I can find some time
   this week to do a full run with it. I really would like to avoid
   having to do a 2.0.1 directly after 2.0.0. It's just numbers, but
   anyway ;)
  
  I've started the full run yesterday. I patched reporting/harness to
  include the STDERR output in the lintian.log, let's see whether that
  helps us to track down the readelf problems.
 
 Having got an etch chroot set up on my laptop (an i386) I've managed to
 reproduce the problem. At base, each of the affected binaries is
 returning invalid operation from objdump, and etch's readelf does not
 deal well with attempting to parse the binary.
 
 This appears to be fairly simply fixable by only using readelf if the
 error returned by objdump was File format not recognized, which
 accounts for all the 64-bit false positives which the readelf code was
 developed to address.
 
 The attached patch modifies the collector script as above and works in
 my testing. I haven't committed it yet as I want to test it with a few
 more packages (and in case anyone had any comments on the approach).
 
 The script could use some work on parts of the code structure, but
 they're not imperative and I've left them for now to produce a saner
 diff.

I wonder if it would make sense to move the
if (open(PIPE, '-|', objdump --headers --private-headers -T $bin 21))
one level up since both branches using it seem to do very
similar things and move the check for the binutils version on level
down instead.

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-rc2-8-g98c0f5c

2008-09-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 98c0f5cf52cbdd2c4996ea0acd3e6d5a21a157ed
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Sun Sep 28 01:11:52 2008 +0200

Prepare for 2.0.0 upload

diff --git a/debian/changelog b/debian/changelog
index efe6921..9dc9cf8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,6 @@
-lintian (2.0.0) UNRELEASED; urgency=low
+lintian (2.0.0) unstable; urgency=low
+
+  The and this is only the beginning release.
 
   * checks/fields:
 + [RA] Allow tildes in the optional version number in the Source
@@ -21,7 +23,7 @@ lintian (2.0.0) UNRELEASED; urgency=low
   * reporting/harness:
 + [FL] Include STDERR output in lintian.log.
 
- -- Russ Allbery [EMAIL PROTECTED]  Wed, 24 Sep 2008 11:13:27 -0700
+ -- Frank Lichtenheld [EMAIL PROTECTED]  Sun, 28 Sep 2008 01:08:41 +0200
 
 lintian (2.0.0~rc2) experimental; urgency=low
 

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker annotated tag, 2.0.0, created. 2.0.0

2008-09-28 Thread Frank Lichtenheld
The annotated tag, 2.0.0 has been created
at  94e15228e887f8e2c652e284609efdb6f4036204 (tag)
   tagging  98c0f5cf52cbdd2c4996ea0acd3e6d5a21a157ed (commit)
  replaces  2.0.0-rc2
 tagged by  Frank Lichtenheld
on  Sun Sep 28 01:14:47 2008 +0200

- Shortlog 
Release 2.0.0
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAkjevnQACgkQQbn06FtxPfCHqACgiSy0lkN1UmSY9NG/4hxByiGV
udUAnAtBSu2OS61RKVxK7csNUGqkEXU8
=VBcj
-END PGP SIGNATURE-

Adam D. Barratt (1):
  Detect {,foo} and {foo,} as brace expansions in bashism checks.

Frank Lichtenheld (6):
  man/lintian.1: Remove a stray backslash.
  frontend/lintian: Fix config file parsing which I completly broke in 
f7ef97e3
  Update TODO list
  reporting/harness: Include STDERR output in lintian.log
  Lintian::Schedule::add_pkg_list(): Fix parsing of source package entries
  Prepare for 2.0.0 upload

Russ Allbery (1):
  Allow tildes in the version field of Source

---

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-13-g0094324

2008-09-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 19c1ea79e7bac6861f0b09eb4f65775e114d3ae5
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Sep 19 13:31:44 2008 +0200

Lintian::Output: New module for bundeling lintian output functionality

Create a object oriented interface but use a default object if called
without an object.

The methods are designed to be overridable to allow easy generation of
alternative output formats.

diff --git a/lib/Lintian/Output.pm b/lib/Lintian/Output.pm
new file mode 100644
index 000..32827c1
--- /dev/null
+++ b/lib/Lintian/Output.pm
@@ -0,0 +1,164 @@
+# Copyright (C) 2008 Frank Lichtenheld [EMAIL PROTECTED]
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, you can find it on the World Wide
+# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+package Lintian::Output;
+
+use strict;
+use warnings;
+
+use v5.8.0; # for PerlIO
+
+# support for ANSI color output via colored()
+use Term::ANSIColor ();
+use Tags ();
+
+use base qw(Class::Accessor Exporter);
+Lintian::Output-mk_accessors(qw(verbose debug quiet color colors stdout 
stderr));
+
+our @EXPORT = ();
+our %EXPORT_TAGS = ( messages = [qw(msg v_msg warning debug_msg delimiter)],
+util = [qw(_global_or_object)]);
+our @EXPORT_OK = (@{$EXPORT_TAGS{messages}},
+ @{$EXPORT_TAGS{util}},
+ 'string');
+
+# for the non-OO interface
+our $GLOBAL = new Lintian::Output;
+
+my %default_colors = ( 'E' = 'red' , 'W' = 'yellow' , 'I' = 'cyan' );
+
+sub new {
+my ($class, %options) = @_;
+my $self = { %options };
+
+bless($self, $class);
+
+$self-stdout(\*STDOUT);
+$self-stderr(\*STDERR);
+$self-colors({%default_colors});
+
+return $self;
+}
+
+sub debug_msg {
+my ($self, $level, @args) = _global_or_object(@_);
+
+return unless $self-debug  ($self-debug = $level);
+
+$self-_message(@args);
+}
+
+sub warning {
+my ($self, @args) = _global_or_object(@_);
+
+return if $self-quiet;
+$self-_warning(@args);
+}
+
+sub v_msg {
+my ($self, @args) = _global_or_object(@_);
+
+return unless $self-verbose;
+$self-_message(@args);
+}
+
+sub msg {
+my ($self, @args) = _global_or_object(@_);
+
+return if $self-quiet;
+$self-_message(@args);
+}
+
+sub string {
+my ($self, $lead, @args) = _global_or_object(@_);
+
+my $output = '';
+if (@args) {
+   foreach (@args) {
+   $output .= $lead.': '.$_.\n;
+   }
+} elsif ($lead) {
+   $output .= $lead..\n;
+}
+
+return $output;
+}
+
+sub print_tag {
+my ( $self, $pkg_info, $tag_info, $information ) = _global_or_object(@_);
+
+my $extra = '';
+$extra =  @$information if @$information;
+$extra = '' if $extra eq ' ';
+my $code = Tags::get_tag_code($tag_info);
+my $tag_color = $self-{colors}{$code};
+$code = 'X' if exists $tag_info-{experimental};
+$code = 'O' if $tag_info-{overridden}{override};
+my $type = '';
+$type =  $pkg_info-{type} if $pkg_info-{type} ne 'binary';
+
+my $tag;
+if ($self-color eq 'always'
+   || ($self-color eq 'auto'  -t $self-stdout)) {
+   $tag .= Term::ANSIColor::colored($tag_info-{tag}, $tag_color);
+} else {
+   $tag .= $tag_info-{tag};
+}
+
+$self-_print('', $code: $pkg_info-{pkg}$type, $tag$extra);
+}
+
+sub delimiter {
+my ($self) = _global_or_object(@_);
+
+return $self-_delimiter;
+}
+
+sub _delimiter {
+return '';
+}
+
+sub _message {
+my ($self, @args) = @_;
+
+$self-_print('', 'N', @args);
+}
+
+sub _warning {
+my ($self, @args) = @_;
+
+$self-_print($self-stderr, 'warning', @args);
+}
+
+sub _print {
+my ($self, $stream, $lead, @args) = @_;
+$stream ||= $self-stdout;
+
+my $output = $self-string($lead, @args);
+print {$stream} $output;
+}
+
+sub _global_or_object {
+if (ref($_[0]) and $_[0]-isa('Lintian::Output')) {
+   return @_;
+} else {
+   return ($Lintian::Output::GLOBAL, @_);
+}
+}
+
+1;

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-13-g0094324

2008-09-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 46484edc999a095bee986ab6017409790263f3cc
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Sep 19 14:16:32 2008 +0200

Begin conversion to Lintian::Output

This commit includes only the safe changes that do not actually change the
output. Note that this commit on its own will not work, I just wanted to
separate the safe changes from the ones that do change something.

diff --git a/frontend/lintian b/frontend/lintian
index 98418f8..a3dd59a 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -42,10 +42,8 @@ my $LAB_FORMAT = 8;  #Lab format Version Number
 # they were set via commandline or environment variables
 my $pkg_mode = 'a';# auto -- automatically search for
# binary and source pkgs
-use vars qw($verbose);
-$verbose = 0;  #flag for -v|--verbose switch
-our $debug = 0;#flag for -d|--debug switch
-our $quiet = 0;#flag for -q|--quiet switch
+my $verbose = 0;   #flag for -v|--verbose switch
+my $quiet = 0; #flag for -q|--quiet switch
 my @debug;
 my $check_everything = 0;  #flag for -a|--all switch
 my $lintian_info = 0;  #flag for -i|--info switch
@@ -483,10 +481,6 @@ if (defined $LINTIAN_ROOT) {
 $LINTIAN_ROOT = '/usr/share/lintian';
 }
 
-$debug = $#debug + 1;
-$verbose = 1 if $debug;
-$::verbose = $verbose; # that's $main::verbose
-
 # keep-lab implies unpack-level=2 unless explicetly
 # given otherwise
 if ($keep_lab and not defined $unpack_level) {
@@ -619,22 +613,10 @@ foreach (('ROOT', 'CFG', VARS)) {
 }
 }
 
+my $debug = $#debug + 1;
+$verbose = 1 if $debug;
 $ENV{'LINTIAN_DEBUG'} = $debug;
 
-# Print Debug banner, now that we're finished determining
-# the values
-if ($debug) {
-print N: $BANNER\n;
-print N: Lintian root directory: $LINTIAN_ROOT\n;
-print N: Configuration file: $LINTIAN_CFG\n;
-print N: Laboratory: $LINTIAN_LAB\n;
-print N: Archive directory: $LINTIAN_ARCHIVEDIR\n;
-print N: Distribution: $LINTIAN_DIST\n;
-print N: Default unpack level: $LINTIAN_UNPACK_LEVEL\n;
-print N: Architecture: $LINTIAN_ARCH\n;
-print N: \n;
-}
-
 # }}}
 
 # {{{ Loading lintian's own libraries (now LINTIAN_ROOT is known)
@@ -653,10 +635,8 @@ require Tags;
 import Tags;
 
 require Lintian::Schedule;
-
-my @l_secs = read_dpkg_control($LINTIAN_ROOT/checks/lintian.desc);
-shift(@l_secs);
-map { $_-{'script'} = 'lintian'; Tags::add_tag($_) } @l_secs;
+require Lintian::Output;
+import Lintian::Output qw(:messages);
 
 no warnings 'once';
 if (defined $experimental_output_opts) {
@@ -676,6 +656,29 @@ if (defined $experimental_output_opts) {
 }
 }
 
+$Lintian::Output::GLOBAL-verbose($verbose);
+$Lintian::Output::GLOBAL-debug($debug);
+$Lintian::Output::GLOBAL-quiet($quiet);
+$Lintian::Output::GLOBAL-color($color);
+
+# Print Debug banner, now that we're finished determining
+# the values and have Lintian::Output available
+debug_msg(1,
+ $BANNER,
+ Lintian root directory: $LINTIAN_ROOT,
+ Configuration file: $LINTIAN_CFG,
+ Laboratory: $LINTIAN_LAB,
+ Archive directory: $LINTIAN_ARCHIVEDIR,
+ Distribution: $LINTIAN_DIST,
+ Default unpack level: $LINTIAN_UNPACK_LEVEL,
+ Architecture: $LINTIAN_ARCH,
+ delimiter(),
+);
+
+my @l_secs = read_dpkg_control($LINTIAN_ROOT/checks/lintian.desc);
+shift(@l_secs);
+map { $_-{'script'} = 'lintian'; Tags::add_tag($_) } @l_secs;
+
 $Tags::show_experimental = $display_experimentaltags;
 $Tags::show_overrides = $show_overrides;
 %Tags::display_level = %display_level;
@@ -706,7 +709,7 @@ $LAB = new Lab( $LINTIAN_LAB, $LINTIAN_DIST );
 # Process -S option
 if ($action eq 'setup-lab') {
 if ($#ARGV+1  0) {
-   print STDERR warning: ignoring additional command line arguments\n;
+   warning(ignoring additional command line arguments);
 }
 
 $LAB-setup_static()
@@ -718,7 +721,7 @@ if ($action eq 'setup-lab') {
 # Process -R option
 } elsif ($action eq 'remove-lab') {
 if ($#ARGV+1  0) {
-   print STDERR warning: ignoring additional command line arguments\n;
+   warning(ignoring additional command line arguments);
 }
 
 $LAB-delete_static()
@@ -749,7 +752,7 @@ $LINTIAN_LAB = $LAB-{dir};
 #   be moved up
 if ($lintian_info) {
 open(OUTPUT_PIPE, '|-', $lintian_info_cmd) or fail(cannot open output 
pipe to $lintian_info_cmd: $!);
-select OUTPUT_PIPE;
+$Lintian::Output::GLOBAL-stdout(\*OUTPUT_PIPE);
 }
 
 # Close the OUTPUT_PIPE in an END block so that we can ensure that
@@ -757,10 +760,10 @@ if ($lintian_info) {
 # lintian-info after lintian exits, which can confuse the shell output.
 END {
 if ($lintian_info) {
-my $status = $?;
-close OUTPUT_PIPE;
-select STDOUT;
-$? = $status;
+   my $status = $?;
+   close OUTPUT_PIPE

[SCM] Debian package checker branch, master, updated. 2.0.0-13-g0094324

2008-09-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 9238cdbb534fc0110753bf911272f6bd242e3797
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Sep 19 18:01:04 2008 +0200

Do not use STDERR for debug output

I don't think this is something worth supporting in Lintian::Output.

diff --git a/frontend/lintian b/frontend/lintian
index a3dd59a..80bff27 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -1273,30 +1273,28 @@ if ($check_everything) {
 read_bin_list($LINTIAN_LAB/info/binary-packages, 0);
 read_udeb_list($LINTIAN_LAB/info/udeb-packages, 0);
 
-if ($debug = 2) {
-  print STDERR pkg_mode = $pkg_mode\n;
-  for my $arg (keys %source_info) {
-print STDERR $arg.\n;
-  }
+debug_msg(2, pkg_mode = $pkg_mode);
+for my $arg (keys %source_info) {
+   debug_msg(2, keys %source_info);
 }
 
 if (($pkg_mode eq 'a') or ($pkg_mode eq 's')) {
for my $arg (keys %source_info) {
-   print STDERR doing stuff with 
$LINTIAN_ARCHIVEDIR/$source_info{$arg}-{'file'}\n if $debug;
+   debug_msg(1, doing stuff with 
$LINTIAN_ARCHIVEDIR/$source_info{$arg}-{'file'});
$schedule-add_file('s', 
$LINTIAN_ARCHIVEDIR/$source_info{$arg}-{'file'},
%{$source_info{$arg}});
}
 }
 if (($pkg_mode eq 'a') or ($pkg_mode eq 'b')) {
for my $arg (keys %binary_info) {
-   print STDERR doing stuff with 
$LINTIAN_ARCHIVEDIR/$binary_info{$arg}-{'file'}\n if $debug;
+   debug_msg(1, doing stuff with 
$LINTIAN_ARCHIVEDIR/$binary_info{$arg}-{'file'});
$schedule-add_file('b', 
$LINTIAN_ARCHIVEDIR/$binary_info{$arg}-{'file'},
%{$binary_info{$arg}});
}
 }
 if (($pkg_mode eq 'a') or ($pkg_mode eq 'u')) {
for my $arg (keys %udeb_info) {
-   print STDERR doing stuff with 
$LINTIAN_ARCHIVEDIR/$udeb_info{$arg}-{'file'}\n if $debug;
+   debug_msg(1, doing stuff with 
$LINTIAN_ARCHIVEDIR/$udeb_info{$arg}-{'file'});
$schedule-add_file('u', 
$LINTIAN_ARCHIVEDIR/$udeb_info{$arg}-{'file'},
%{$udeb_info{$arg}});
}
diff --git a/lib/Lab.pm b/lib/Lab.pm
index a111baf..c854885 100644
--- a/lib/Lab.pm
+++ b/lib/Lab.pm
@@ -138,7 +138,7 @@ sub populate_with_dist {
 return 0 unless $dist;
 return 0 unless $self-{dir};
 
-print STDERR spawning list-binpkg, list-udebpkg and list-srcpkg since 
LINTIAN_DIST=$dist\n if ($debug = 2);
+debug(2, spawning list-binpkg, list-udebpkg and list-srcpkg since 
LINTIAN_DIST=$dist);
 
 my $v = $Lintian::Output::GLOBAL-verbose ? '-v' : '';
 

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-13-g0094324

2008-09-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit ff91d8b19631846fd4113d7f3058f21bbd87a98c
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Sat Sep 20 12:29:54 2008 +0200

Move tag output to Lintian::Output

Convert output format modules to subclasses of Lintian::Output.

Note: This commit breaks support for --color=html (which was undocumented
anyway and should be reimplemented as an own class) and changes the
behaviour of --color=auto -i (which could be fixed by not using
lintian-info for implementing -i anymore).

diff --git a/frontend/lintian b/frontend/lintian
index 8171ddc..628ae19 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -51,7 +51,7 @@ our $display_experimentaltags = 0; #flag for 
-E|--display-experimental switch
 my $unpack_level = undef;  #flag for -l|--unpack-level switch
 our $no_override = 0;  #flag for -o|--no-override switch
 our $show_overrides = 0;   #flag for --show-overrides switch
-our $color = 'never';  #flag for --color switch
+my $color = 'never';   #flag for --color switch
 my $check_checksums = 0;   #flag for -m|--md5sums|--checksums switch
 my $allow_root = 0;#flag for --allow-root switch
 my $fail_on_warnings = 0;   #flag for --fail-on-warnings switch
@@ -644,11 +644,11 @@ if (defined $experimental_output_opts) {
 foreach (keys %opts) {
if ($_ eq 'format') {
if ($opts{$_} eq 'colons') {
-   require Tags::ColonSeparated;
-   $Tags::output_formatter = \Tags::ColonSeparated::print_tag;
+   require Lintian::Output::ColonSeparated;
+   $Lintian::Output::GLOBAL = new Lintian::Output::ColonSeparated;
} elsif ($opts{$_} eq 'letterqualifier') {
-   require Tags::LetterQualifier;
-   $Tags::output_formatter = \Tags::LetterQualifier::print_tag;
+   require Lintian::Output::LetterQualifier;
+   $Lintian::Output::GLOBAL = new Lintian::Output::LetterQualifier;
}
}
no strict 'refs';
@@ -683,7 +683,6 @@ $Tags::show_experimental = $display_experimentaltags;
 $Tags::show_overrides = $show_overrides;
 %Tags::display_level = %display_level;
 %Tags::display_source = %display_source;
-$Tags::color = $color;
 %Tags::only_issue_tags = map { $_ = 1 } (split(/,/, $check_tags))
 if defined $check_tags;
 use warnings;
diff --git a/lib/Lintian/Output.pm b/lib/Lintian/Output.pm
index 32827c1..3fc41aa 100644
--- a/lib/Lintian/Output.pm
+++ b/lib/Lintian/Output.pm
@@ -113,8 +113,7 @@ sub print_tag {
 $type =  $pkg_info-{type} if $pkg_info-{type} ne 'binary';
 
 my $tag;
-if ($self-color eq 'always'
-   || ($self-color eq 'auto'  -t $self-stdout)) {
+if ($self-_do_color) {
$tag .= Term::ANSIColor::colored($tag_info-{tag}, $tag_color);
 } else {
$tag .= $tag_info-{tag};
@@ -123,6 +122,14 @@ sub print_tag {
 $self-_print('', $code: $pkg_info-{pkg}$type, $tag$extra);
 }
 
+sub _do_color {
+my ($self) = @_;
+
+return ($self-color eq 'always'
+   || ($self-color eq 'auto'
+-t $self-stdout));
+}
+
 sub delimiter {
 my ($self) = _global_or_object(@_);
 
diff --git a/lib/Tags/ColonSeparated.pm b/lib/Lintian/Output/ColonSeparated.pm
similarity index 51%
rename from lib/Tags/ColonSeparated.pm
rename to lib/Lintian/Output/ColonSeparated.pm
index 37ec076..ffbb5de 100644
--- a/lib/Tags/ColonSeparated.pm
+++ b/lib/Lintian/Output/ColonSeparated.pm
@@ -1,7 +1,7 @@
 # Tags::ColonSeparated -- Perl tags functions for lintian
 # $Id: Tags.pm 489 2005-09-17 00:06:30Z djpig $
 
-# Copyright (C) 2005 Frank Lichtenheld [EMAIL PROTECTED]
+# Copyright (C) 2005,2008 Frank Lichtenheld [EMAIL PROTECTED]
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,11 +19,66 @@
 # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
 # MA 02110-1301, USA.
 
-package Tags::ColonSeparated;
+package Lintian::Output::ColonSeparated;
 use strict;
 use warnings;
 
-sub quote_char {
+use Lintian::Output qw(:util);
+use base qw(Lintian::Output);
+
+sub print_tag {
+my ( $self, $pkg_info, $tag_info, $information ) = _global_or_object(@_);
+
+my $extra = @$information;
+
+$self-_print(
+   'tag',
+   $tag_info-{type},
+   $tag_info-{severity},
+   $tag_info-{certainty},
+   (exists($tag_info-{experimental}) ? 'X' : '').
+   ($tag_info-{overridden}{override} ? 'O' : ''),
+   @{$pkg_info}{'pkg','version','arch','type'},
+   $tag_info-{tag},
+   $extra,
+   $tag_info-{overridden}{override},
+   );
+}
+
+sub _delimiter {
+return;
+}
+
+sub _message {
+my ($self, @args) = @_;
+
+foreach (@args) {
+   $self-_print('message', $_);
+}
+}
+
+sub _warning {
+my ($self, @args) = @_;
+
+foreach (@args) {
+   $self-_print

[SCM] Debian package checker branch, master, updated. 2.0.0-13-g0094324

2008-09-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 497d366224b081b64454b2ecf27b5afd95ffbf75
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Sun Sep 28 10:43:45 2008 +0200

Changelog entry for Lintian::Output branch

diff --git a/debian/changelog b/debian/changelog
index ac06dbf..60953fc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,24 @@ lintian (2.1.0) unstable; urgency=low
 + [FL] Use $known_shells_regex from common_data.
   * check/scripts:
 + [FL] Use $known_shells_regex from common_data.
+  
+  * frontend/lintian:
++ [FL] Convert to use Lintian::Output.
+  
+  * lib/Lintian/Output:
++ [FL] New module to bundle output methods.
+  * lib/Tags/{ColonSeparated,LetterQualifier}.pm:
++ [FL] Move to lib/Lintian/Output and convert to subclasses of
+  Lintian::Output.
+  * lib/Lintian/Output/XML.pm:
++ [FL] New experimental output format.
+  
+  * lib/Lab.pm:
++ [FL] Convert to use Lintian::Output.
+  * lib/Tags.pm:
++ [FL] Convert to use Lintian::Output.
+  * lib/Util.pm:
++ [FL] Convert to use Lintian::Output.
 
  -- Frank Lichtenheld [EMAIL PROTECTED]  Sun, 28 Sep 2008 10:35:47 +0200
 

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-13-g0094324

2008-09-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 66ef13d69a5f0281c1e6440b73c48ce781cf77e0
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Wed Sep 24 23:07:35 2008 +0200

Lintian::Output: Add print_start_pkg and print_end_pkg hooks

It might be useful to have the actual package meta information
available in the output module to allow more flexible formats.

diff --git a/frontend/lintian b/frontend/lintian
index 628ae19..8b81066 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -1336,7 +1336,6 @@ foreach my $pkg_info ($schedule-get_all) {
 my $long_type = ($type eq 'b' ? 'binary' :
 ($type eq 's' ? 'source' : 'udeb' ));
 
-v_msg(delimiter(), Processing $long_type package $pkg (version $ver) 
...);
 Tags::set_pkg( $file, $pkg, $ver, $arch, $long_type );
 
 # determine base directory
@@ -1610,6 +1609,7 @@ foreach my $pkg_info ($schedule-get_all) {
close(STATUS);
 }
 }
+Tags::reset_pkg();
 if ($action eq 'check' and not $no_override and not $show_overrides) {
 my $errors = $overrides{errors} || 0;
 my $warnings = $overrides{warnings} || 0;
diff --git a/lib/Lintian/Output.pm b/lib/Lintian/Output.pm
index 8547ff6..08a1e87 100644
--- a/lib/Lintian/Output.pm
+++ b/lib/Lintian/Output.pm
@@ -209,16 +209,47 @@ sub delimiter {
 return $self-_delimiter;
 }
 
+=item Cstring($lead, @args)
+
+TODO: Is this part of the public interface?
+
+=cut
+
+sub string {
+my ($self, $lead, @args) = _global_or_object(@_);
+
+my $output = '';
+if (@args) {
+   foreach (@args) {
+   $output .= $lead.': '.$_.\n;
+   }
+} elsif ($lead) {
+   $output .= $lead..\n;
+}
+
+return $output;
+}
+
+=back
+
+=head1 INSTANCE METHODS FOR CONTEXT-AWARE OUTPUT
+
+The following methods are designed to be called at specific points
+during program execution and require very specific arguments.  They
+can only be called as instance methods.
+
+=over 4
+
 =item Cprint_tag($pkg_info, $tag_info, $extra)
 
 Print a tag.  The first two arguments are hash reference with the information
 about the package and the tag, $extra is the extra information for the tag
-(if any) as an array reference.  Tags::tag() is a wrapper around this.
+(if any) as an array reference.  Called from Tags::tag().
 
 =cut
 
 sub print_tag {
-my ( $self, $pkg_info, $tag_info, $information ) = _global_or_object(@_);
+my ($self, $pkg_info, $tag_info, $information) = @_;
 
 my $extra = '';
 $extra =  @$information if @$information;
@@ -240,33 +271,38 @@ sub print_tag {
 $self-_print('', $code: $pkg_info-{pkg}$type, $tag$extra);
 }
 
-=item Cstring($lead, @args)
+=item Cprint_start_pkg($pkg_info)
 
-TODO: Is the part of the public interface?
+Called before lintian starts to handle each package.  The version in
+Lintian::Output uses v_msg() for output.  Called from Tags::select_pkg().
 
 =cut
 
-sub string {
-my ($self, $lead, @args) = _global_or_object(@_);
+sub print_start_pkg {
+my ($self, $pkg_info) = @_;
 
-my $output = '';
-if (@args) {
-   foreach (@args) {
-   $output .= $lead.': '.$_.\n;
-   }
-} elsif ($lead) {
-   $output .= $lead..\n;
-}
+$self-v_msg($self-delimiter,
+Processing $pkg_info-{type} package $pkg_info-{pkg} 
(version $pkg_info-{version}) ...);
+}
 
-return $output;
+=item Cprint_start_pkg($pkg_info)
+
+Called after lintian is finished with a package.  The version in
+Lintian::Output does nothing.  Called from Tags::select_pkg() and
+Tags::reset_pkg().
+
+=cut
+
+sub print_end_pkg {
 }
 
 =back
 
-=head1 INSTANCE METHODS (for subclassing)
+=head1 INSTANCE METHODS FOR SUBCLASSING
 
 The following methods are only intended for subclassing and are
-only available as instance methods.  The methods mentioned above
+only available as instance methods.  The methods mentioned in
+LCLASS/INSTANCE METHODS
 usually only check whether they should do anything at all (according
 to the values of quiet, verbose, and debug) and then call one of
 the following methods to do the actual printing. Allmost all of them
diff --git a/lib/Lintian/Output/ColonSeparated.pm 
b/lib/Lintian/Output/ColonSeparated.pm
index ffbb5de..c738da7 100644
--- a/lib/Lintian/Output/ColonSeparated.pm
+++ b/lib/Lintian/Output/ColonSeparated.pm
@@ -27,7 +27,7 @@ use Lintian::Output qw(:util);
 use base qw(Lintian::Output);
 
 sub print_tag {
-my ( $self, $pkg_info, $tag_info, $information ) = _global_or_object(@_);
+my ($self, $pkg_info, $tag_info, $information) = @_;
 
 my $extra = @$information;
 
diff --git a/lib/Lintian/Output/LetterQualifier.pm 
b/lib/Lintian/Output/LetterQualifier.pm
index 20aa9c8..eaffc42 100644
--- a/lib/Lintian/Output/LetterQualifier.pm
+++ b/lib/Lintian/Output/LetterQualifier.pm
@@ -93,7 +93,7 @@ sub new {
 
 
 sub print_tag {
-my ( $self, $pkg_info, $tag_info, $information ) = @_;
+my ($self, $pkg_info, $tag_info, $information

[SCM] Debian package checker branch, master, updated. 2.0.0-13-g0094324

2008-09-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 8e4ea0ae42c3e58fd220a2f75f96652d12e56dc6
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Wed Sep 24 23:31:14 2008 +0200

Add an XML output as demonstration for print_{start,end}_pkg

diff --git a/frontend/lintian b/frontend/lintian
index 8b81066..b54674e 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -649,6 +649,9 @@ if (defined $experimental_output_opts) {
} elsif ($opts{$_} eq 'letterqualifier') {
require Lintian::Output::LetterQualifier;
$Lintian::Output::GLOBAL = new Lintian::Output::LetterQualifier;
+   } elsif ($opts{$_} eq 'xml') {
+   require Lintian::Output::XML;
+   $Lintian::Output::GLOBAL = new Lintian::Output::XML;
}
}
no strict 'refs';
diff --git a/lib/Lintian/Output/XML.pm b/lib/Lintian/Output/XML.pm
new file mode 100644
index 000..7913f17
--- /dev/null
+++ b/lib/Lintian/Output/XML.pm
@@ -0,0 +1,73 @@
+# Copyright © 2008 Frank Lichtenheld [EMAIL PROTECTED]
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, you can find it on the World Wide
+# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+package Lintian::Output::XML;
+use strict;
+use warnings;
+
+use HTML::Entities;
+
+use Lintian::Output qw(:util);
+use base qw(Lintian::Output);
+
+sub print_tag {
+my ($self, $pkg_info, $tag_info, $information) = @_;
+
+$self-_print_xml('',
+ qq{tag severity=$tag_info-{severity} 
certainty=$tag_info-{certainty}},
+ 'flags='.(exists($tag_info-{experimental}) ? 
'experimental' : ''),
+ ($tag_info-{overridden}{override} ? 'overridden' : 
'').'',
+ 
qq{name=$tag_info-{tag}}.encode_entities(@$information,\').qq{/tag},
+   );
+}
+
+sub print_start_pkg {
+my ($self, $pkg_info) = @_;
+
+$self-_print_xml('',
+ qq{package type=$pkg_info-{type} 
name=$pkg_info-{pkg}},
+ qq{architecture=$pkg_info-{arch} 
version=$pkg_info-{version}}
+   );
+}
+
+sub print_end_pkg {
+my ($self) = @_;
+$self-_print_xml('', '/package');
+}
+
+sub _delimiter {
+return;
+}
+
+sub _print {
+my ($self, $stream, $lead, @args) = @_;
+$stream ||= $self-stderr;
+
+my $output = $self-string($lead, @args);
+print {$stream} $output;
+}
+
+sub _print_xml {
+my ($self, $stream, @args) = @_;
+$stream ||= $self-stdout;
+
+print {$stream} join(' ',@args), \n;
+}
+
+1;
+

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-13-g0094324

2008-09-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 36415a2007dd7b2b74f3f26261a1b9cd0b17175a
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Sun Sep 28 11:59:04 2008 +0200

Tags::get_tag_code: Remove unused parameter

diff --git a/lib/Tags.pm b/lib/Tags.pm
index 68723ba..786674e 100644
--- a/lib/Tags.pm
+++ b/lib/Tags.pm
@@ -207,7 +207,7 @@ sub get_tag_info {
 
 # Returns the E|W|I code for a given tag.
 sub get_tag_code {
-my ( $tag_info, $map ) = @_;
+my ( $tag_info ) = @_;
 return $codes{$tag_info-{severity}}{$tag_info-{certainty}};
 }
 

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-13-g0094324

2008-09-28 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 009432454574818684a15353403cf616cba3ae43
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Sun Sep 28 12:04:11 2008 +0200

Document the fact that --color=html is currently not supported

This will be fixed one way or the other before the next release.
I'm just not sure which one, yet.

diff --git a/frontend/lintian b/frontend/lintian
index d7c2adf..57ccc41 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -496,7 +496,7 @@ if (($check_everything or $packages_file) and $#ARGV+1  0) 
{
 }
 
 # check permitted values for --color
-if ($color and $color !~ /^(never|always|auto|html)$/) {
+if ($color and $color !~ /^(never|always|auto)$/) {
 die invalid argument to --color: $color\n;
 }
 
diff --git a/man/lintian.1 b/man/lintian.1
index 90a20b1..3834c65 100644
--- a/man/lintian.1
+++ b/man/lintian.1
@@ -192,12 +192,10 @@ Don't use the overrides file.
 Output tags that have been overriden.
 
 .TP
-.BR \-\-color  (never|always|auto|html)
+.BR \-\-color  (never|always|auto)
 Whether to colorize tags in lintian output based on their severity.  The
 default is never, which never uses color.  always will always use
-color, auto will use color only if the output is going to a terminal,
-and html will use HTML span tags with a color style attribute (instead
-of ANSI color escape sequences).
+color, and auto will use color only if the output is going to a terminal.
 
 .TP
 .BR \-U  info1,info2,...,  \-\-unpack\-info  info1,info2,...

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-rc2-7-gbf0a6a3

2008-09-26 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 8460349965a18bfa0ee79a842e785b91fe77f1f4
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Sep 26 21:26:06 2008 +0200

Update TODO list

diff --git a/private/TODO b/private/TODO
index 980bddd..b94b9fc 100644
--- a/private/TODO
+++ b/private/TODO
@@ -1,31 +1,19 @@
 Not intended for single bug fixes, use the confirmed and owner tags
 in the BTS, but for somewhat bigger tasks
 
-goals for 1.24.0 [???]
-==
+goals for 2.0.0
+===
 
 - go through all checks and try to move common code to modules
   -- partly done
-- overhaul the Errors/Warnings concept
-  (#197955, #189656)
-  -- will make a proposal after 1.23.1 is released, djpig
-  -- rra: I think we need to classify tags on three axes:
- --- source of check (policy, devref, library, utility man page)
- --- reliability (how sure is lintian the problem is present)
- --- severity (how big of a problem is this)
- where the last corresponds to the current errors/warnings concept and
- the others aren't currently present.  We then need to allow users to
- select what they want to see based on any of the three criteria; for
- instance, ftp-master may want to run lintian in a mode that only does
- Policy and package would be broken checks with severity error and
- the top reliability rating.
+- overhaul the Errors/Warnings concept (#243976)
+  -- mostly done
+  We still need official support for alternative output formats.
+  The current stuff is still experimental. [2.1.0?]
 
 goals not targetted
 ===
 
-- #118170: [frontend] lintian needs lots of space in /tmp
-  should be tackled, don't know when, though
-- go through the test suite and organise it more cleanly
 - update doc/CREDITS file
 - Go through testset/libbaz/debian/rules, and make sure all TODO's are
   lintian-detected
@@ -37,13 +25,13 @@ goals not targetted
 goals outside of the lintian source
 ===
 
-- get lintian.debian.org working again with the current lintian
 - set up system for automatically filing bugs based on specific lintian
   tags (the most reliable ones), with usertags to ensure the bugs aren't
   repeatedly filed
 - set up lintian for use on ftp-master so that it can be used to
   automatically REJECT packages with particular errors.  will require a
   mode that only runs important checks that are highly reliable
+  -- our side mostly done, needs to be implemented by ftp-master now
 
 old todo list
 =

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-rc2-7-gbf0a6a3

2008-09-26 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 8bc3312c6ea98f7e147be7faf87b1d050169cdd7
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Fri Sep 26 21:38:10 2008 +0200

reporting/harness: Include STDERR output in lintian.log

diff --git a/debian/changelog b/debian/changelog
index a57d763..f65b50a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,9 @@ lintian (2.0.0) UNRELEASED; urgency=low
 
   * man/lintian.1:
 + [FL] Remove a stray backslash.
+  
+  * reporting/harness:
++ [FL] Include STDERR output in lintian.log.
 
  -- Russ Allbery [EMAIL PROTECTED]  Wed, 24 Sep 2008 11:13:27 -0700
 
diff --git a/reporting/harness b/reporting/harness
index c5ce5d2..e8ba97b 100755
--- a/reporting/harness
+++ b/reporting/harness
@@ -116,7 +116,7 @@ unless ($opt_f || $opt_c) {
 
 if ($opt_f) { # check all packages
   Log(Running Lintian over all packages...);
-  my $cmd = $lintian_cmd -I -E -v -a --show-overrides -U changelog-file 
$lintian_log;
+  my $cmd = $lintian_cmd -I -E -v -a --show-overrides -U changelog-file 
$lintian_log 21;
   Log(Executing $cmd);
   my $res = (system($cmd)  8);
   (($res == 0) or ($res == 1))
@@ -233,7 +233,7 @@ if ($opt_i) { # process changes only
 
 # run Lintian over the newly introduced or changed packages
 Log(Running Lintian over newly introduced and changed packages...);
-my $cmd = $lintian_cmd -I -E -v --show-overrides -p $list_file -U 
changelog-file $lintian_log;
+my $cmd = $lintian_cmd -I -E -v --show-overrides -p $list_file -U 
changelog-file $lintian_log 21;
 Log(Executing $cmd);
 my $res = (system($cmd)  8);
 (($res == 0) or ($res == 1))

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Upload and Blog-Post

2008-09-25 Thread Frank Lichtenheld
On Wed, Sep 24, 2008 at 10:56:10AM +0200, Frank Lichtenheld wrote:
 On Mon, Sep 22, 2008 at 01:20:58AM +0200, Frank Lichtenheld wrote:
  I've uploaded an rc2 to experimental. I hope I can find some time
  this week to do a full run with it. I really would like to avoid
  having to do a 2.0.1 directly after 2.0.0. It's just numbers, but
  anyway ;)
 
 I've started the full run yesterday. I patched reporting/harness to
 include the STDERR output in the lintian.log, let's see whether that
 helps us to track down the readelf problems.

The full run is finished and the results are online at
lintian.debian.org including the full log with STDERR
output.

Unless someone finds a serious issue with the results, I plan to do an
unstable upload on the weekend.

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Upload and Blog-Post

2008-09-24 Thread Frank Lichtenheld
On Mon, Sep 22, 2008 at 01:20:58AM +0200, Frank Lichtenheld wrote:
 I've uploaded an rc2 to experimental. I hope I can find some time
 this week to do a full run with it. I really would like to avoid
 having to do a 2.0.1 directly after 2.0.0. It's just numbers, but
 anyway ;)

I've started the full run yesterday. I patched reporting/harness to
include the STDERR output in the lintian.log, let's see whether that
helps us to track down the readelf problems.

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-rc2-3-g8f45c3d

2008-09-24 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 8f45c3d9fdd2cf279328a6316f1407965bf8f683
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Sun Sep 21 23:46:29 2008 +0200

man/lintian.1: Remove a stray backslash.

diff --git a/debian/changelog b/debian/changelog
index 35ec757..f2994b8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,9 @@ lintian (2.0.0) UNRELEASED; urgency=low
   blank component (e.g. {foo,}). Thanks to Jonny Lamb for pointing
   this out.
 
+  * man/lintian.1:
++ [FL] Remove a stray backslash.
+
  -- Russ Allbery [EMAIL PROTECTED]  Wed, 24 Sep 2008 11:13:27 -0700
 
 lintian (2.0.0~rc2) experimental; urgency=low
diff --git a/man/lintian.1 b/man/lintian.1
index d15508c..90a20b1 100644
--- a/man/lintian.1
+++ b/man/lintian.1
@@ -162,7 +162,7 @@ without running lintian, see
 .TP
 .BR \-I ,  \-\-display\-info
 Display informational (I:) tags as well.  They are normally suppressed.
-(This is \equivalent to
+(This is equivalent to
 .BR \-L  \(dq=wishlist\(dq).
 
 .TP

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: [RFC/PATCH] New Lintian::Output module

2008-09-22 Thread Frank Lichtenheld
On Mon, Sep 22, 2008 at 06:40:15PM -0500, Raphael Geissert wrote:
 Jordà Polo wrote:
  On Sun, Sep 21, 2008 at 12:51:44PM -0500, Raphael Geissert wrote:
  Btw, why would it be any useful to print them until the whole package is
  processed? I would find printing them after every check script is run
  better.
  
  The current lintian output is thought to be human-readable _and_
  machine-parseable. I think it would be interesting to have some sort of
  output more focused on the former. It could be used when a packager only
  wants to check only a small number of packages, and it would be similar
  to the website in terms of how the information is structured.
 
 Hmm, right. Maybe output formaters should be able to indicate at what
 point of the process they want to act/be called.

Nah, no need to expose that to the outside. As I said, adding
calls to defined methods at the start and end of each package and
check and defining them empty for Lintian::Output should suffice.

The formatters can then override these methods if they need to.

But maybe that was what you meant anway.

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: [RFC/PATCH] New Lintian::Output module

2008-09-21 Thread Frank Lichtenheld
On Sat, Sep 20, 2008 at 06:57:17PM -0700, Russ Allbery wrote:
 Frank Lichtenheld [EMAIL PROTECTED] writes:
 
  A patch series to bundle all the output logic of lintian into
  modules and to make it easier to define new output formats.
 
  Comments welcome.
 
 Looks like a great idea to me.
 
 I'd like to add POD documentation to all of Lintian's internal modules,
 but we can of course do that later.

Certainly. I just had the code finished first, but proper POD
documentation is planned.

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#498096: setting package to lintian, tagging 498096, tagging 498897, tagging 495431

2008-09-21 Thread Frank Lichtenheld
# Automatically generated email from bts, devscripts version 2.10.35
# via tagpending 
#
# lintian (2.0.0~rc2) experimental; urgency=low
#
#  * checks/fields{,.desc}:
#+ [FL] Warn about Perl module packages superseded by Perl
#  core.  Patch by Niko Tyni.  (Closes: #498897)
#  * checks/scripts:
#+ [FL] Accept the ocaml virtual packages as providing ocamlrun.
#  Based on a patch by Stephane Glondu.  (Closes: #495431)
#  * checks/standards-version:
#+ [FL] Use new Lintian::Collect::Source-binaries method to
#  fix udeb detection.  Thanks to Raphael Geissert.
#  (Closes: #498096)
#

package lintian
tags 498096 + pending
tags 498897 + pending
tags 495431 + pending




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#497247: setting package to lintian, tagging 497247

2008-09-21 Thread Frank Lichtenheld
# Automatically generated email from bts, devscripts version 2.10.35
# via tagpending 
#
# lintian (2.0.0~rc2) experimental; urgency=low
#
#  * checks/rules:
#+ [FL] Do not issue desktop-file-but-no-dh_desktop-call if the
#  package uses dh.  (Closes: #497247)
#

package lintian
tags 497247 + pending




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-rc1-14-g2d55c59

2008-09-21 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 5f85c0732470f41049e00bd5e8a867acfb9fa51b
Author: Niko Tyni [EMAIL PROTECTED]
Date:   Sun Sep 14 12:51:56 2008 +0300

Check for packages also provided by the perl core with at least the same 
version.

diff --git a/checks/fields b/checks/fields
index 07895be..13161ff 100644
--- a/checks/fields
+++ b/checks/fields
@@ -187,6 +187,12 @@ if (not defined $info-field('version')) {
if ($version =~ /\+b\d+$/  $type eq source) {
tag binary-nmu-debian-revision-in-source, $version;
}
+   my $name = $info-field('package');
+   if ($name  $perl_core_provides-known($name) 
+   perl_core_has_version($name, '=', $upstream)) {
+   my $core_version = $perl_core_provides-value($name);
+   tag package-superseded-by-perl, with $core_version
+   }
} else {
tag bad-version-number, $version;
}
diff --git a/checks/fields.desc b/checks/fields.desc
index 54b18e5..f62c5a1 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -1014,3 +1014,24 @@ Info: This package declares an unnecessary versioned 
dependency
  Example: perl-modules (gt;= 5.10.0) | libmodule-build-perl (gt;= 0.26)
 Ref: policy 7.5
 
+Tag: package-superseded-by-perl
+Type: warning
+Severity: normal
+Certainty: certain
+Info: This package is also provided by one of the Perl core packages
+ (perl, perl-base, perl-modules), and the core version is at least
+ as new as this one.
+ .
+ The package should either be upgraded to a newer upstream version
+ or removed from the archive as unnecessary. In the removal case, any
+ versioned dependencies on this package must first be changed to include
+ the Perl core package (because versioned dependencies are not satisfied
+ by provided packages).
+ .
+ The recommended way to express the dependency without needless
+ complications on backporting packages is to use alternative dependencies.
+ The Perl core package should be the preferred alternative and the
+ versioned dependency a secondary one.
+ .
+ Example: perl-modules (gt;= 5.10.0) | libmodule-build-perl (gt;= 0.26)
+Ref: policy 7.5

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-rc1-14-g2d55c59

2008-09-21 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 7b00a608af86e77b08b1d616d65afc5d86c9bdee
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Sun Sep 21 13:03:38 2008 +0200

Add changelog entry for package-superseded-by-perl

diff --git a/debian/changelog b/debian/changelog
index f5607e0..1f8fd7d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,15 @@
 lintian (2.0.0) unstable; urgency=low
 
+  * Summary of tag changes:
++ Added:
+  - package-superseded-by-perl
+  
   * checks/copyright-file:
 + [FL] Also detect v1.1 of CeCILL license, not only v2.0.
   (Closes: #498994)
+  * checks/fields{,.desc}:
++ [FL] Warn about Perl module packages superseded by Perl
+  core.  Patch by Niko Tyni.  (Closes: #498897)
   
   * frontend/lintian:
 + [FL] Add support for ranges to --display-level.

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-rc1-14-g2d55c59

2008-09-21 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit eb735ddaf9d76a8ff7736ca84da23b03fe31a653
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Sat Sep 20 11:59:46 2008 +0200

frontend/lintian: Improve extra information of 
file-size-mismatch-in-changes-file

Include size mismatch information in the tag output and do not output it
as a separate message.

diff --git a/frontend/lintian b/frontend/lintian
index 2d5f7dd..789b87f 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -880,7 +880,8 @@ while (my $arg = shift) {
my ($checksum,$size,$file) = split(/\s+/o, $_);
$files{$file}{$alg} = $checksum;
if ($files{$file}{size} != $size) {
-   tag( file-size-mismatch-in-changes-file, $file );
+   tag( file-size-mismatch-in-changes-file, $file,
+$files{$file}{size} != $size );
}
}
}
@@ -894,10 +895,10 @@ while (my $arg = shift) {
warn E: $file does not exist, exiting\n;
exit(-1);
}
-   if (-s _ ne $files{$file}{size}) {
-   print N: size is $files{$file}{size}, argname is 
$arg_name, filename is $filename\n;
-
-   tag( file-size-mismatch-in-changes-file, $file );
+   my $size = -s _;
+   if ($size ne $files{$file}{size}) {
+   tag( file-size-mismatch-in-changes-file, $file,
+$files{$file}{size} != $size);
}
 
# check checksums

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-rc1-14-g2d55c59

2008-09-21 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit bf8932fe4771f76d61c60a05ffc6a6037a587b6b
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Sun Sep 21 14:15:42 2008 +0200

checks/scripts: Escape some '.' characters in regular expressions

diff --git a/checks/scripts b/checks/scripts
index d0ee095..26b4bb6 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -245,7 +245,7 @@ for my $filename (sort keys %{$info-scripts}) {
 # Skip files that have the #! line, but are not executable and do not have
 # an absolute path and are not in a bin/ directory (/usr/bin, /bin etc)
 # They are probably not scripts after all.
-next if ($filename !~ m,(bin/|etc/init.d/), and !$executable{$filename}
+next if ($filename !~ m,(bin/|etc/init\.d/), and !$executable{$filename}
  and !$is_absolute);
 
 if ($interpreter eq ) {
@@ -265,13 +265,13 @@ for my $filename (sort keys %{$info-scripts}) {
or $filename =~ m,\.ex$,
or $filename eq './etc/init.d/skeleton'
or $filename =~ m,^\./etc/menu-methods,
-   or $filename =~ m,^\./etc/X11/Xsession.d,);
+   or $filename =~ m,^\./etc/X11/Xsession\.d,);
 
 # Warn about csh scripts.
 tag(csh-considered-harmful, $filename)
 if (($base eq 'csh' or $base eq 'tcsh')
and $executable{$filename}
-   and $filename !~ m,^./etc/csh/login.d/,);
+   and $filename !~ m,^\./etc/csh/login\.d/,);
 
 # Syntax-check most shell scripts, but don't syntax-check scripts that end
 # in .dpatch.  bash -n doesn't stop checking at exit 0 and goes on to blow
@@ -333,9 +333,9 @@ for my $filename (sort keys %{$info-scripts}) {
if ($depends  !Dep::implies($deps{all}, Dep::parse($depends))) {
if ($base =~ /^(python|ruby|(m|g)awk)$/) {
tag($base-script-but-no-$base-dep, $filename);
-   } elsif ($base eq 'csh'  $filename =~ m,^\./etc/csh/login.d/,) {
+   } elsif ($base eq 'csh'  $filename =~ m,^\./etc/csh/login\.d/,) {
# Initialization files for csh.
-   } elsif ($base eq 'fish'  $filename =~ m,^./etc/fish.d/,) {
+   } elsif ($base eq 'fish'  $filename =~ m,^\./etc/fish\.d/,) {
# Initialization files for fish.
} else {
tag('missing-dep-for-interpreter', $base = $depends,
@@ -530,10 +530,10 @@ while (SCRIPTS) {
# doesn't exist, only tag direct invocations where invoke-rc.d is
# never used in the same script.  Lots of false negatives, but
# hopefully not many false positives.
-   if (m%^\s*/etc/init.d/(\S+)\s+[\\']?(\S+)[\\']?%) {
+   if (m%^\s*/etc/init\.d/(\S+)\s+[\\']?(\S+)[\\']?%) {
$saw_init = $.;
}
-   if (m%^\s*invoke-rc.d\s+%) {
+   if (m%^\s*invoke-rc\.d\s+%) {
$saw_invoke = $.;
}
 

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-rc1-14-g2d55c59

2008-09-21 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 5b1b65d6ce5a6dc275cc9c72b4b24dcf60f2d21b
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Sun Sep 21 15:54:51 2008 +0200

checks/standards-version: Fix udeb detection

Use new Lintian::Collect::Source-binaries method to fix udeb detection.
Thanks to Raphael Geissert.

Closes: #498096

diff --git a/checks/standards-version b/checks/standards-version
index 990bb8a..014e6e2 100644
--- a/checks/standards-version
+++ b/checks/standards-version
@@ -83,8 +83,16 @@ my $info = shift;
 # udebs aren't required to conform to policy, so they don't need
 # Standards-Version. (If they have it, though, it should be valid.)
 my $version = $info-field('standards-version');
+my $pkgs = $info-binaries;
+my $all_udeb = 1;
+foreach my $bin_type (values %$pkgs) {
+if ($bin_type ne 'udeb') {
+$all_udeb = 0;
+last;
+}
+}
 if (not defined $version) {
-tag 'no-standards-version-field' unless $type eq 'udeb';
+tag 'no-standards-version-field' unless $all_udeb;
 return 0;
 }
 
diff --git a/debian/changelog b/debian/changelog
index 23aca38..228e65d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,10 @@ lintian (2.0.0) unstable; urgency=low
   * checks/scripts:
 + [FL] Accept the ocaml virtual packages as providing ocamlrun.
   Based on a patch by Stephane Glondu.  (Closes: #495431)
+  * checks/standards-version:
++ [FL] Use new Lintian::Collect::Source-binaries method to
+  fix udeb detection.  Thanks to Raphael Geissert.
+  (Closes: #498096)
   
   * frontend/lintian:
 + [FL] Add support for ranges to --display-level.

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-rc1-14-g2d55c59

2008-09-21 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit aa2d14844c0414d6d2c9c66f887cbf5a8c45f447
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Sun Sep 21 15:38:35 2008 +0200

Move detection of package types from debhelper check to 
Lintian::Collect::Source

This can be useful for excluding udebs in other scripts, too.

diff --git a/checks/debhelper b/checks/debhelper
index 6f12883..7490825 100644
--- a/checks/debhelper
+++ b/checks/debhelper
@@ -27,6 +27,7 @@ sub run {
 
 my $pkg = shift;
 my $type = shift;
+my $info = shift;
 
 use lib $ENV{'LINTIAN_ROOT'}/lib;
 use Dep;
@@ -146,23 +147,8 @@ close RULES;
 
 return unless $seencommand;
 
-# We may need to make a difference between deb and udeb packages
-# so try to find out
-my (%pkgs, $single_pkg);
-opendir(BINPKGS, 'control')
-or fail(Can't open control directory.);
-while(my $binpkg = readdir(BINPKGS)) {
-next if $binpkg =~ /^\.\.?$/;
-if (-d control/$binpkg) {
-if (open TYPE, , control/$binpkg/xc-package-type) {
-$pkgs{$binpkg} = TYPE || 'deb';
-} else {
-$pkgs{$binpkg} = 'deb';
-}
-   $single_pkg = $pkgs{$binpkg};
-}
-}
-$single_pkg = undef unless keys(%pkgs) == 1;
+my $pkgs = $info-binaries;
+my $single_pkg = keys(%$pkgs) == 1 ? $pkgs-{(keys(%$pkgs))[0]} : '';
 
 # If we got this far, they need to have #DEBHELPER# in their scripts.  Search
 # for scripts that look like maintainer scripts.  Also collect dependency
@@ -185,8 +171,9 @@ while (defined(my $file=readdir(DEBIAN))) {
close IN;
 
if ((! $seentag) and $needtomodifyscripts) {
-   unless (($binpkg  $pkgs{$binpkg}  ($pkgs{$binpkg} =~ /udeb/i))
-   or (!$binpkg  $single_pkg  ($single_pkg =~ /udeb/i))) {
+   unless (($binpkg  exists($pkgs-{$binpkg})
+ ($pkgs-{$binpkg} eq 'udeb'))
+   or (!$binpkg  ($single_pkg eq 'udeb'))) {
tag maintainer-script-lacks-debhelper-token, debian/$file;
}
}
diff --git a/debian/changelog b/debian/changelog
index c8efc7d..23aca38 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ lintian (2.0.0) unstable; urgency=low
   * checks/copyright-file:
 + [FL] Also detect v1.1 of CeCILL license, not only v2.0.
   (Closes: #498994)
+  * checks/debhelper:
++ [FL] Use new Lintian::Collect::Source-binaries method.
   * checks/fields{,.desc}:
 + [FL] Warn about Perl module packages superseded by Perl
   core.  Patch by Niko Tyni.  (Closes: #498897)
@@ -16,6 +18,10 @@ lintian (2.0.0) unstable; urgency=low
   
   * frontend/lintian:
 + [FL] Add support for ranges to --display-level.
+  
+  * lib/Lintian/Collect/Source.pm:
++ [FL] New binaries method that returns a hash with binary package
+  names and types.
 
  -- Frank Lichtenheld [EMAIL PROTECTED]  Tue, 16 Sep 2008 19:34:29 +0200
 
diff --git a/lib/Lintian/Collect/Source.pm b/lib/Lintian/Collect/Source.pm
index 016385f..2bfdb2e 100644
--- a/lib/Lintian/Collect/Source.pm
+++ b/lib/Lintian/Collect/Source.pm
@@ -66,6 +66,35 @@ sub native {
 return $self-{native};
 }
 
+# List of binary packages and their type if specified
+sub binaries {
+my ($self) = @_;
+return $self-{binaries} if exists $self-{binaries};
+
+my %pkgs;
+opendir(BINPKGS, 'control')
+or fail(Can't open control directory.);
+while (my $binpkg = readdir(BINPKGS)) {
+next if $binpkg =~ /^\.\.?$/;
+if (-d control/$binpkg) {
+if (open TYPE, , control/$binpkg/xc-package-type) {
+my $type = TYPE || '';
+chomp $type;
+$type = lc $type;
+$pkgs{$binpkg} = $type || 'deb';
+close TYPE;
+} else {
+$pkgs{$binpkg} = 'deb';
+}
+}
+}
+closedir BINPKGS;
+
+$self-{binaries} = \%pkgs;
+
+return $self-{binaries};
+}
+
 =head1 NAME
 
 Lintian::Collect::Source - Lintian interface to source package data collection
@@ -118,6 +147,11 @@ file, which this method expects to find in 
Fdebfiles/changelog.
 
 Returns true if the source package is native and false otherwise.
 
+=item binaries()
+
+Returns a hash reference with the binary package names as keys and the
+Package-Type as value (which should be either 'deb' or 'udeb' currently).
+
 =back
 
 =head1 AUTHOR

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-rc1-14-g2d55c59

2008-09-21 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 8b84263100ca98d893c5158e2064dfd2e7554a44
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Sun Sep 21 16:14:37 2008 +0200

Do not issue desktop-file-but-no-dh_desktop-call if the package uses dh

Closes: #497247

diff --git a/checks/rules b/checks/rules
index f655c1e..cedc6a4 100644
--- a/checks/rules
+++ b/checks/rules
@@ -170,7 +170,7 @@ unless ($includes) {
 if (Dep::implies($build_deps, Dep::parse(debhelper))) {
 #.desktop files usually imply dh_desktop:
if (scalar @{[glob(debfiles/*.desktop)]} 
-   ! grep { /^\s*dh_desktop/ } map { @$_ } values %rules_per_target) {
+   ! grep { /^\s*(dh_desktop|dh\s+.*(\$\@|binary))/ } map { @$_ } 
values %rules_per_target) {
tag desktop-file-but-no-dh_desktop-call;
}
 }
diff --git a/debian/changelog b/debian/changelog
index eb38a69..9bbb13c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,9 @@ lintian (2.0.0~rc2) experimental; urgency=low
   * checks/fields{,.desc}:
 + [FL] Warn about Perl module packages superseded by Perl
   core.  Patch by Niko Tyni.  (Closes: #498897)
+  * checks/rules:
++ [FL] Do not issue desktop-file-but-no-dh_desktop-call if the
+  package uses dh.  (Closes: #497247)
   * checks/scripts:
 + [FL] Accept the ocaml virtual packages as providing ocamlrun.
   Based on a patch by Stephane Glondu.  (Closes: #495431)
diff --git a/testset/dh7-test/debian/foo.desktop 
b/testset/dh7-test/debian/foo.desktop
new file mode 100644
index 000..8b13789
--- /dev/null
+++ b/testset/dh7-test/debian/foo.desktop
@@ -0,0 +1 @@
+

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-rc1-14-g2d55c59

2008-09-21 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 06d5e31bf9623c9288d247ce84f0413ec3ebcd9f
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Sun Sep 21 15:00:26 2008 +0200

checks/scripts: Accept the ocaml virtual packages as providing ocamlrun

Based on a patch by Stephane Glondu.

Closes: #495431

diff --git a/checks/scripts b/checks/scripts
index 26b4bb6..8013212 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -337,6 +337,8 @@ for my $filename (sort keys %{$info-scripts}) {
# Initialization files for csh.
} elsif ($base eq 'fish'  $filename =~ m,^\./etc/fish\.d/,) {
# Initialization files for fish.
+   } elsif ($base eq 'ocamlrun'  $all_deps =~ 
/\bocaml(-base)?(-nox)?-\d\.[\d.]+/) {
+   # ABI-versioned virtual packages for ocaml
} else {
tag('missing-dep-for-interpreter', $base = $depends,
($filename));
diff --git a/debian/changelog b/debian/changelog
index 1f8fd7d..c8efc7d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,9 @@ lintian (2.0.0) unstable; urgency=low
   * checks/fields{,.desc}:
 + [FL] Warn about Perl module packages superseded by Perl
   core.  Patch by Niko Tyni.  (Closes: #498897)
+  * checks/scripts:
++ [FL] Accept the ocaml virtual packages as providing ocamlrun.
+  Based on a patch by Stephane Glondu.  (Closes: #495431)
   
   * frontend/lintian:
 + [FL] Add support for ranges to --display-level.
diff --git a/t/tests/6000_scripts-ocamlrun.desc 
b/t/tests/6000_scripts-ocamlrun.desc
new file mode 100644
index 000..4859be0
--- /dev/null
+++ b/t/tests/6000_scripts-ocamlrun.desc
@@ -0,0 +1,6 @@
+Testname: scripts-ocamlrun
+Type: non-native
+Version: 1.0
+Description: Test correct handling of ocamlrun scripts
+Test-Against: missing-dep-for-interpreter
+References: Debian Bug#495431
diff --git a/t/templates/skel/debian/control.in 
b/t/tests/scripts-ocamlrun/debian/debian/control.in
similarity index 78%
copy from t/templates/skel/debian/control.in
copy to t/tests/scripts-ocamlrun/debian/debian/control.in
index bc8f6c0..d40a17a 100644
--- a/t/templates/skel/debian/control.in
+++ b/t/tests/scripts-ocamlrun/debian/debian/control.in
@@ -7,7 +7,7 @@ Build-Depends: debhelper (= 7)
 
 Package: {$srcpkg}
 Architecture: {$architecture}
-Depends: $\{shlib:Depends\}, $\{misc:Depends\}
+Depends: ocaml-nox-3.10.2, $\{shlib:Depends\}, $\{misc:Depends\}
 Description: {$description}
  .
  Part of the lintian test suite.
diff --git a/t/tests/scripts-ocamlrun/tags b/t/tests/scripts-ocamlrun/tags
new file mode 100644
index 000..1a0dab6
--- /dev/null
+++ b/t/tests/scripts-ocamlrun/tags
@@ -0,0 +1 @@
+W: scripts-ocamlrun: binary-without-manpage usr/bin/script1
diff --git a/t/tests/scripts-ocamlrun/upstream/Makefile 
b/t/tests/scripts-ocamlrun/upstream/Makefile
new file mode 100644
index 000..54fa3ef
--- /dev/null
+++ b/t/tests/scripts-ocamlrun/upstream/Makefile
@@ -0,0 +1,8 @@
+default:
+   :
+
+install:
+   install -d $(DESTDIR)/usr/bin
+   install -m755 script1 $(DESTDIR)/usr/bin/
+
+.PHONY: distclean realclean clean install test check
diff --git a/t/tests/scripts-ocamlrun/upstream/script1 
b/t/tests/scripts-ocamlrun/upstream/script1
new file mode 100644
index 000..49c50f2
--- /dev/null
+++ b/t/tests/scripts-ocamlrun/upstream/script1
@@ -0,0 +1 @@
+#!/usr/bin/ocamlrun

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



[SCM] Debian package checker branch, master, updated. 2.0.0-rc1-14-g2d55c59

2008-09-21 Thread Frank Lichtenheld
The following commit has been merged in the master branch:
commit 0f9a110ee698f13809bdafca2bf87ff444e42b6a
Author: Frank Lichtenheld [EMAIL PROTECTED]
Date:   Sun Sep 21 15:58:29 2008 +0200

debian/changelog: Make a second release candidate for 2.0.0

I want to make a full run with that before uploading to unstable.

diff --git a/debian/changelog b/debian/changelog
index 228e65d..eb38a69 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-lintian (2.0.0) unstable; urgency=low
+lintian (2.0.0~rc2) experimental; urgency=low
 
   * Summary of tag changes:
 + Added:
@@ -27,7 +27,7 @@ lintian (2.0.0) unstable; urgency=low
 + [FL] New binaries method that returns a hash with binary package
   names and types.
 
- -- Frank Lichtenheld [EMAIL PROTECTED]  Tue, 16 Sep 2008 19:34:29 +0200
+ -- Frank Lichtenheld [EMAIL PROTECTED]  Sun, 21 Sep 2008 15:56:51 +0200
 
 lintian (2.0.0~rc1) experimental; urgency=low
 

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: [RFC/PATCH] New Lintian::Output module

2008-09-21 Thread Frank Lichtenheld
On Sun, Sep 21, 2008 at 05:58:27PM +0200, Jordà Polo wrote:
 On Sat, Sep 20, 2008 at 01:57:45PM +0200, Frank Lichtenheld wrote:
  A patch series to bundle all the output logic of lintian into
  modules and to make it easier to define new output formats.
  
  Comments welcome.
 
 Good. I think it is better than the current way of doing it, just a few
 comments:
 
 Isn't it a bit confusing that verbose messages are printed using v_msg
 while debug messages use debug_msg? On the other hand, verbose is a
 subset of debug, and I'm not sure if there is any reason to keep them
 apart. I mean, perhaps it would make sense to have a single subroutine
 and convert verbose messages to level 0 debug messages (only printed if
 --verbose is enabled).

Will think about that.

 One of the outputs I thought about involved printing after processing
 the packages instead of printing as tags are found. How would you
 implement it with the new interface? I guess it shouldn't be a problem
 to add a flush() method to print remaining tags. There is probably no
 need to add it at the moment since current outputs do not require it,
 just wanted to know what do you think about it.

Storing the tag information in the object instead of printing it should
be no problem for a subclass. And adding a hook at the start and end
of each package and each check is something that was on my mind, too
(I don't know what output you're thinking of, but it would certainly
make it e.g. easier to create a useful XML output).

So if you want to propose some patches in that direction, they would
certainly be welcome.

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: [RFC/PATCH] New Lintian::Output module

2008-09-21 Thread Frank Lichtenheld
On Sun, Sep 21, 2008 at 12:51:44PM -0500, Raphael Geissert wrote:
 Jordà Polo wrote:
 ...
  
  One of the outputs I thought about involved printing after processing
  the packages instead of printing as tags are found. 
 
 This could also help avoid the usage of $warned{tag-name} and similar kind
 of checks to avoid issuing duplicated tags. Of course it also depends on
 the kind of check, i.e. if the check is very expensive a $warned-like var
 should be used anyway.

I agree.

Maybe it could also be used to rate limiting like we currently do for
e.g. hyphen-used-as-minus-sign.

Patches in this direction are welcome.

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



  1   2   3   4   5   >