Bug#507241: lintian: --color not working any more

2008-11-29 Thread gregor herrmann
Package: lintian
Version: 2.1.0
Severity: minor

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

In 2.1.0 the friendly --color option doesn't work any more.

If I change the following:

#v+

- --- Output.pm.bak 2008-11-29 10:53:20.0 +0100
+++ Output.pm   2008-11-29 11:33:27.0 +0100
@@ -112,11 +112,11 @@
  @{$EXPORT_TAGS{util}},
  'string');
 
+my %default_colors = ( 'E' = 'red' , 'W' = 'yellow' , 'I' = 'cyan' );
+
 # 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 };


#v-

I get --colors=always back.

- --colors=auto still fails because $self-stdout gets changed from
\*STDOUT to \*::OUTPUT_PIPE somewhere and therefore _do_color returns false.
Unfortunately I have no idea where/how this happens ...

Cheers,
gregor

- -- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'oldstable'), (500, 'experimental'), 
(500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.27.200811231333
Locale: LANG=C, [EMAIL PROTECTED] (charmap=ISO-8859-15)
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.46-1   produces graph of changes introduc
ii  dpkg-dev1.14.23  Debian package development tools
ii  file4.26-1   Determines file type using magic
ii  gettext 0.17-6   GNU Internationalization utilities
ii  intltool-debian 0.35.0+20060710.1Help i18n of RFC822 compliant conf
ii  libipc-run-perl 0.80-2   Perl module for running processes
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-18Larry Wall's Practical Extraction 

lintian recommends no packages.

Versions of packages lintian suggests:
pn  binutils-multiarchnone (no description available)
ii  libtext-template-perl 1.44-1.2   Text::Template perl module
ii  man-db2.5.2-3on-line manual pager

- -- no debconf information

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

iEYEARECAAYFAkkxG94ACgkQOzKYnQDzz+QA3QCgoVcjBtliv3VMA3ebPcxWilMp
pfEAoNUmJbwdBn8YyxgZhmWSJ4HCBTMM
=Brxl
-END PGP SIGNATURE-



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



Bug#507241: lintian: --color not working any more

2008-11-29 Thread Adam D. Barratt
On Sat, 2008-11-29 at 11:39 +0100, gregor herrmann wrote:
 In 2.1.0 the friendly --color option doesn't work any more.
 
 If I change the following:
[define %default_colors before creating the $GLOBAL output object]
 I get --colors=always back.

That looks obviously correct to me; thanks.

 - --colors=auto still fails because $self-stdout gets changed from
 \*STDOUT to \*::OUTPUT_PIPE somewhere and therefore _do_color returns false.
 Unfortunately I have no idea where/how this happens ...

I'm guessing you're calling lintian with -i? If so, that's because the
extra output is generated by piping lintian's output to lintian-info,
which now causes the colour to be disabled when using auto.

I'm looking at a patch that makes lintian able to generate the output
itself, thus allowing the combination of -i and --color=auto to work
again (and will post it to the list for review once I've done some more
testing).

Regards,

Adam



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

2008-11-29 Thread Adam D. Barratt
The following commit has been merged in the master branch:
commit cb815e536d7e33646c2cc6b23d14cee0a2d7e35c
Author: Adam D. Barratt [EMAIL PROTECTED]
Date:   Sat Nov 29 15:11:11 2008 +

Initialise %default_colors before creating the global output object.

* lib/Lintian/Output.pm:
  + Make sure the default list of colours is initialised before
attempting to use it.  Thanks, gregor herrmann.  (Closes: #507241)

diff --git a/debian/changelog b/debian/changelog
index b4362e0..be61ffb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,7 +14,10 @@ lintian (2.1.1) unstable; urgency=low
 
   * lib/Lab.pm:
 + [FL] Fix breakage of populate_with_dist() I introduced in 2.1.0.
-  
+  * lib/Lintian/Output.pm:
++ [ADB] Make sure the default list of colours is initialised before
+  attempting to use it.  Thanks, gregor herrmann.  (Closes: #507241)
+
  -- Adam D. Barratt [EMAIL PROTECTED]  Fri, 28 Nov 2008 21:47:33 +
 
 lintian (2.1.0) unstable; urgency=low
diff --git a/lib/Lintian/Output.pm b/lib/Lintian/Output.pm
index 08a1e87..02beb03 100644
--- a/lib/Lintian/Output.pm
+++ b/lib/Lintian/Output.pm
@@ -113,10 +113,10 @@ our @EXPORT_OK = (@{$EXPORT_TAGS{messages}},
  'string');
 
 # for the non-OO interface
-our $GLOBAL = new Lintian::Output;
-
 my %default_colors = ( 'E' = 'red' , 'W' = 'yellow' , 'I' = 'cyan' );
 
+our $GLOBAL = new Lintian::Output;
+
 sub new {
 my ($class, %options) = @_;
 my $self = { %options };

-- 
Debian package checker


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



Bug#507241: lintian: --color not working any more

2008-11-29 Thread gregor herrmann
On Sat, 29 Nov 2008 14:01:42 +, Adam D. Barratt wrote:

 [define %default_colors before creating the $GLOBAL output object]
 That looks obviously correct to me; thanks.

Cool, thanks.
 
  - --colors=auto still fails because $self-stdout gets changed from
  \*STDOUT to \*::OUTPUT_PIPE somewhere and therefore _do_color returns false.
  Unfortunately I have no idea where/how this happens ...
 I'm guessing you're calling lintian with -i? 

Indeed, sorry for not mentioning (and not testing without).

 If so, that's because the
 extra output is generated by piping lintian's output to lintian-info,
 which now causes the colour to be disabled when using auto.

I see.
(And I was looking for OUTPUT_PIPE only in
/usr/share/lintian/lib/Lintian ...)
 
 I'm looking at a patch that makes lintian able to generate the output
 itself, thus allowing the combination of -i and --color=auto to work
 again (and will post it to the list for review once I've done some more
 testing).

Great, much appreciated.

Cheers,
gregor

-- 
 .''`.   Home: http://info.comodo.priv.at/{,blog/} / GPG Key ID: 0x00F3CFE4
 : :' :  Debian GNU/Linux user, admin,  developer - http://www.debian.org/
 `. `'   Member of VIBE!AT, SPI Inc., fellow of FSFE | http://got.to/quote/
   `-NP: Flying Pickets: Sign Your Name


signature.asc
Description: Digital signature


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

2008-11-29 Thread Adam D. Barratt
Hi,

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.

Cheers,

Adam
diff --git a/debian/changelog b/debian/changelog
index be61ffb..de6964a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,11 +12,25 @@ 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.
+  * frontend/lintian:
++ [ADB] Don't pipe output to lintian-info when --info is specified.
+  Instead, simply set a variable which can be used later by the output
+  code.
+
   * lib/Lintian/Output.pm:
 + [ADB] Make sure the default list of colours is initialised before
   attempting to use it.  Thanks, gregor herrmann.  (Closes: #507241)
++ [ADB] Optionally display the full description of a tag (i.e. when
+  the frontend was called with --info).
+
+  * lib/Lab.pm:
++ [FL] Fix breakage of populate_with_dist() I introduced in 2.1.0.
+  * lib/Read_taginfo.pm:
++ [ADB] Qualify the call to read_dpkg_control in read_tag_info(), so
+  that it can be called from Output::print_tag().
+  * lib/Tags.pm:
++ [ADB] When displaying a tag, indicate whether its full description
+  should be included.
 
  -- Adam D. Barratt [EMAIL PROTECTED]  Fri, 28 Nov 2008 21:47:33 +
 
diff --git a/frontend/lintian b/frontend/lintian
index fe9a823..3b1608a 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -29,7 +29,6 @@ use FileHandle;
 # }}}
 
 # {{{ Global Variables
-my $lintian_info_cmd = 'lintian-info'; #Command to run for ?
 my $LINTIAN_VERSION = VERSION;	#External Version number
 my $BANNER = Lintian v$LINTIAN_VERSION; #Version Banner - text form
 my $LAB_FORMAT = 8;		#Lab format Version Number
@@ -473,10 +472,6 @@ if (defined $LINTIAN_ROOT) {
 unless ($LINTIAN_ROOT =~ m,^/,) {
 	$LINTIAN_ROOT = $cwd/$LINTIAN_ROOT;
 }
-# see if it has a frontend directory
-if (-d $LINTIAN_ROOT/frontend) {
-$lintian_info_cmd = $LINTIAN_ROOT/frontend/lintian-info;
-}
 } else {
 $LINTIAN_ROOT = '/usr/share/lintian';
 }
@@ -684,6 +679,7 @@ map { $_-{'script'} = 'lintian'; Tags::add_tag($_) } @l_secs;
 
 $Tags::show_experimental = $display_experimentaltags;
 $Tags::show_overrides = $show_overrides;
+$Tags::show_description = $lintian_info;
 %Tags::display_level = %display_level;
 %Tags::display_source = %display_source;
 %Tags::only_issue_tags = map { $_ = 1 } (split(/,/, $check_tags))
@@ -747,29 +743,6 @@ $LINTIAN_LAB = $LAB-{dir};
 
 # }}}
 
-# {{{ Setup the lintian-info pipe
-
-# pipe output through lintian-info?
-# note: if any E:/W: lines are added above this point, this block needs to
-#   be moved up
-if ($lintian_info) {
-open(OUTPUT_PIPE, '|-', $lintian_info_cmd) or fail(cannot open output pipe to $lintian_info_cmd: $!);
-$Lintian::Output::GLOBAL-stdout(\*OUTPUT_PIPE);
-}
-
-# Close the OUTPUT_PIPE in an END block so that we can ensure that
-# lintian-info exits before we do.  Otherwise, we may get output from
-# lintian-info after lintian exits, which can confuse the shell output.
-END {
-if ($lintian_info) {
-	my $status = $?;
-	close OUTPUT_PIPE;
-	$Lintian::Output::GLOBAL-stdout(\*STDOUT);
-	$? = $status;
-}
-}
-# }}}
-
 # {{{ Compile list of files to process
 
 $schedule = new Lintian::Schedule(verbose = $verbose);
diff --git a/lib/Lintian/Output.pm b/lib/Lintian/Output.pm
index 02beb03..aaa904c 100644
--- a/lib/Lintian/Output.pm
+++ b/lib/Lintian/Output.pm
@@ -22,6 +22,9 @@ use strict;
 use warnings;
 
 use v5.8.0; # for PerlIO
+use lib $ENV{'LINTIAN_ROOT'}/lib;
+use Read_taginfo;
+use Text_utils;
 
 =head1 NAME
 
@@ -240,16 +243,19 @@ can only be called as instance methods.
 
 =over 4
 
-=item Cprint_tag($pkg_info, $tag_info, $extra)
+=item Cprint_tag($pkg_info, $tag_info, $extra, $show_description)
 
 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.  Called from Tags::tag().
+(if any) as an array reference.  $show_description indicates whether the
+tag's description should also be displayed.  Called from Tags::tag().
 
 =cut
 
+my %already_displayed;
+my %tag_list;
 sub print_tag {
-my ($self, $pkg_info, $tag_info, $information) = @_;
+my ($self, $pkg_info, $tag_info, $information, $show_description) = @_;
 
 my $extra = '';
 $extra =  @$information if @$information;
@@ -269,6 +275,16 @@ sub print_tag {
 }
 
 $self-_print('', $code: $pkg_info-{pkg}$type, $tag$extra);
+if ($show_description) {
+	if 

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]



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

2008-11-29 Thread Adam D. Barratt
On Sat, 2008-11-29 at 17:00 +0100, Frank Lichtenheld wrote:
 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:

That'll teach me to ask for comments. :-)

Seriously, thanks for the feedback; constructive criticism is always
appreciated. 

Adam


-- 
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 Sandro Tosi
Package: lintian
Version: 2.0.0
Severity: minor

Hello,
__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.

Thanks in advance (and for your huge work),
Sandro

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.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.46-1   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  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:
pn  binutils-multiarchnone (no description available)
pn  libtext-template-perl none (no description available)
ii  man-db2.5.2-3on-line manual pager

-- no debconf information



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



Bug#507278: lintian: complains about uninitialized values for severity and certainty

2008-11-29 Thread Adam D. Barratt
On Sat, 2008-11-29 at 18:26 +0100, Neil Williams wrote:
 lintian has started outputting a lot of perl warnings:
 
 Use of uninitialized value $severity in hash element at 
 /usr/share/lintian/lib/Tags.pm line 293.
 Use of uninitialized value $certainty in hash element at 
 /usr/share/lintian/lib/Tags.pm line 293.
 (repeated once for each test)
 
 In this particular case, I was running lintian after a build of the current 
 version of ipsec-tools in unstable/testing (without changes).

Apologies for the amount of information requested, but the warnings
suggest that something is quite broken, and I can't reproduce them
locally.

The above sounds like lintian's not reading the tag files
from /usr/share/lintian/checks/*.desc properly. The number of
occurrences of Tag:, Severity: and Certainty: in each file should
match.

Would it be possible to get hold of a copy of the package(s) you're
checking? I've just done apt-get source ipsec-tools; pdebuild on an
amd64 unstable box and lintian 2.1.0 didn't produce any perl warnings
when run against the .changes, .dsc or .deb.

Finally, do you have LINTIAN_ROOT set in your environment?

Regards,

Adam



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

2008-11-29 Thread Adam D. Barratt
The following commit has been merged in the master branch:
commit 66f927e62c0a0f62309c83549d96631c7d59fe3c
Author: Adam D. Barratt [EMAIL PROTECTED]
Date:   Sat Nov 29 18:26:49 2008 +

Don't output a start package message for a .changes files.

Don't output a Processing binary package foo.changes (version ) message.
Thanks Sandro Tosi for pointing the issue out.

.changes files aren't really packages, but we pretend they're binary
packages so that we can issue tags against them.

We already output a message indicating we're processing a .changes
file so the start package message is spurious and somewhat confusing.
Maybe we should have a changes type rather than faking them as binary
packages, but in the meantime this gets us back to the pre-::Output
output.

diff --git a/debian/changelog b/debian/changelog
index 920c05c..fea113e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,6 +21,9 @@ lintian (2.1.1) unstable; urgency=low
 
   * lib/Lab.pm:
 + [FL] Fix breakage of populate_with_dist() I introduced in 2.1.0.
+  * lib/Tags.pm:
++ [ADB] Don't output a Processing binary package foo.changes message.
+  Thanks Sandro Tosi for pointing the issue out.
 
  -- Adam D. Barratt [EMAIL PROTECTED]  Fri, 28 Nov 2008 21:47:33 +
 
diff --git a/lib/Tags.pm b/lib/Tags.pm
index 310a8a1..51f30c3 100644
--- a/lib/Tags.pm
+++ b/lib/Tags.pm
@@ -131,7 +131,9 @@ sub select_pkg {
$Lintian::Output::GLOBAL-print_end_pkg($info{$current});
 }
 $current = $file;
-$Lintian::Output::GLOBAL-print_start_pkg($info{$current});
+if ($file !~ /.changes$/) {
+   $Lintian::Output::GLOBAL-print_start_pkg($info{$current});
+}
 return 1;
 }
 

-- 
Debian package checker


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



Processed (with 1 errors): Re: Bug#507278: lintian: complains about uninitialized values for severity and certainty

2008-11-29 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

 clone -1
Unknown command or malformed arguments to command.

 reassign -1 emdebian-tools
Bug number -1 not found. (Is it archived?)

 retitle -1 emdebian.desc lintian checks should include certainty values
Bug number -1 not found. (Is it archived?)

 severity 507278 wishlist
Bug#507278: lintian: complains about uninitialized values for severity and 
certainty
Severity set to `wishlist' from `minor'

 retitle 507278 please check for out-of-sync check files in 
 /usr/share/lintian/checks
Bug#507278: lintian: complains about uninitialized values for severity and 
certainty
Changed Bug title to `please check for out-of-sync check files in 
/usr/share/lintian/checks' from `lintian: complains about uninitialized values 
for severity and certainty'.

 thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


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



Bug#507278: lintian: complains about uninitialized values for severity and certainty

2008-11-29 Thread Neil Williams
clone -1
reassign -1 emdebian-tools
retitle -1 emdebian.desc lintian checks should include certainty values
severity 507278 wishlist
retitle 507278 please check for out-of-sync check files in 
/usr/share/lintian/checks
thanks

On Sat, 29 Nov 2008 18:20:16 +
Adam D. Barratt [EMAIL PROTECTED] wrote:

 On Sat, 2008-11-29 at 18:26 +0100, Neil Williams wrote:
  lintian has started outputting a lot of perl warnings:
  
  Use of uninitialized value $severity in hash element
  at /usr/share/lintian/lib/Tags.pm line 293. Use of uninitialized
  value $certainty in hash element at /usr/share/lintian/lib/Tags.pm
  line 293. (repeated once for each test)
  
  In this particular case, I was running lintian after a build of the
  current version of ipsec-tools in unstable/testing (without
  changes).
 
 Apologies for the amount of information requested, but the warnings
 suggest that something is quite broken, and I can't reproduce them
 locally.
 
 The above sounds like lintian's not reading the tag files
 from /usr/share/lintian/checks/*.desc properly. The number of
 occurrences of Tag:, Severity: and Certainty: in each file
 should match.

Ah. In that case, the problem
is /usr/share/lintian/checks/emdebian.desc

I didn't know that the desc file had to be updated.

 Would it be possible to get hold of a copy of the package(s) you're
 checking? I've just done apt-get source ipsec-tools; pdebuild on an
 amd64 unstable box and lintian 2.1.0 didn't produce any perl warnings
 when run against the .changes, .dsc or .deb.

It would be good if lintian wasn't quite so noisy about such errors,
hence I've cloned this as wishlist for lintian as well as reassigning
to emdebian-tools.

-- 


Neil Williams
=
http://www.data-freedom.org/
http://www.linux.codehelp.co.uk/
http://e-mail.is-not-s.ms/



pgp0tkI5mLuPN.pgp
Description: PGP signature


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]



Processed: cloning 507278, reassign -1 to emdebian-tools ...

2008-11-29 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

 clone 507278 -1
Bug#507278: please check for out-of-sync check files in 
/usr/share/lintian/checks
Bug 507278 cloned as bug 507285.

 reassign -1 emdebian-tools
Bug#507285: please check for out-of-sync check files in 
/usr/share/lintian/checks
Bug reassigned from package `lintian' to `emdebian-tools'.

 retitle -1 emdebian.desc lintian checks should include certainty values
Bug#507285: please check for out-of-sync check files in 
/usr/share/lintian/checks
Changed Bug title to `emdebian.desc lintian checks should include certainty 
values' from `please check for out-of-sync check files in 
/usr/share/lintian/checks'.


End of message, stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


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



Bug#507278: more uninitialized values with lintian --color=auto

2008-11-29 Thread Neil Williams
$ alias | grep lintian
alias lintian='lintian --color=auto'

$ lintian ../ipsec-tools_0.7.1-1.3_amd64.changes
Use of uninitialized value $_ in split at 
/usr/share/perl/5.10/Term/ANSIColor.pm line 121.
Use of uninitialized value in concatenation (.) or string at 
/usr/share/perl/5.10/Term/ANSIColor.pm line 187.
W: ipsec-tools source: debhelper-but-no-misc-depends ipsec-tools
Use of uninitialized value $_ in split at 
/usr/share/perl/5.10/Term/ANSIColor.pm line 121.
Use of uninitialized value in concatenation (.) or string at 
/usr/share/perl/5.10/Term/ANSIColor.pm line 187.
W: ipsec-tools source: debhelper-but-no-misc-depends racoon
Use of uninitialized value $_ in split at 
/usr/share/perl/5.10/Term/ANSIColor.pm line 121.
Use of uninitialized value in concatenation (.) or string at 
/usr/share/perl/5.10/Term/ANSIColor.pm line 187.
W: ipsec-tools source: out-of-date-standards-version 3.7.3 (current is 3.8.0)
Use of uninitialized value $_ in split at 
/usr/share/perl/5.10/Term/ANSIColor.pm line 121.
Use of uninitialized value in concatenation (.) or string at 
/usr/share/perl/5.10/Term/ANSIColor.pm line 187.
W: racoon: non-dev-pkg-with-shlib-symlink usr/lib/libracoon.so.0.0.0 
usr/lib/libracoon.so
Use of uninitialized value $_ in split at 
/usr/share/perl/5.10/Term/ANSIColor.pm line 121.
Use of uninitialized value in concatenation (.) or string at 
/usr/share/perl/5.10/Term/ANSIColor.pm line 187.
W: racoon: package-name-doesnt-match-sonames libracoon0
Use of uninitialized value $_ in split at 
/usr/share/perl/5.10/Term/ANSIColor.pm line 121.
Use of uninitialized value in concatenation (.) or string at 
/usr/share/perl/5.10/Term/ANSIColor.pm line 187.
W: ipsec-tools: package-name-doesnt-match-sonames libipsec0

The errors go away if I avoid the alias using /usr/bin/lintian.



-- 


Neil Williams
=
http://www.data-freedom.org/
http://www.linux.codehelp.co.uk/
http://e-mail.is-not-s.ms/



pgpbH699ZTSI3.pgp
Description: PGP signature


Bug#507278: more uninitialized values with lintian --color=auto

2008-11-29 Thread Adam D. Barratt
On Sat, 2008-11-29 at 20:22 +0100, Neil Williams wrote:
 $ alias | grep lintian
 alias lintian='lintian --color=auto'
 
 $ lintian ../ipsec-tools_0.7.1-1.3_amd64.changes
 Use of uninitialized value $_ in split at 
 /usr/share/perl/5.10/Term/ANSIColor.pm line 121.
 Use of uninitialized value in concatenation (.) or string at 
 /usr/share/perl/5.10/Term/ANSIColor.pm line 187.
 W: ipsec-tools source: debhelper-but-no-misc-depends ipsec-tools

These are a side-effect of the bug reported in #507241, which is already
fixed in the repository.

Regards,

Adam



-- 
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-29 Thread Russ Allbery
Raphael Geissert [EMAIL PROTECTED] writes:

 3.- Long term solution:
 Turn some portions of uscan into a perl module[1] and use it to extract the
 dversionmangle regex.

 If there are really so many cases out there where this bug occurs and
 people is desperate to have it fixed instead of overriding the warning
 until a proper fix is available, am willing to work on 2. Otherwise, I
 will be working on the pm part of 3 some time soon, which just like the
 checkbashisms as pm stuff will need to be integrated in lintian
 afterwards.

3 is definitely the right solution in my opinion.

-- 
Russ Allbery ([EMAIL PROTECTED])   http://www.eyrie.org/~eagle/



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



Bug#507241: lintian: --color not working any more

2008-11-29 Thread Russ Allbery
Adam D. Barratt [EMAIL PROTECTED] writes:

 I'm guessing you're calling lintian with -i? If so, that's because the
 extra output is generated by piping lintian's output to lintian-info,
 which now causes the colour to be disabled when using auto.

 I'm looking at a patch that makes lintian able to generate the output
 itself, thus allowing the combination of -i and --color=auto to work
 again (and will post it to the list for review once I've done some more
 testing).

A short-term fix would be to have Lintian check whether stdout is a tty
before spawning lintian-info, but your fix is the better one, so if you're
close to having it working already, we should just go with that.

-- 
Russ Allbery ([EMAIL PROTECTED])   http://www.eyrie.org/~eagle/



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



Bug#498875: lintian: please detect 2.x licences and warn

2008-11-29 Thread Raphael Geissert
tag 498875 - moreinfo
thanks

Attaching updated patch with a more accurate description of the situation and 
new, extra, references.

As for excluding PHP from the check: since the check is binary-based it would 
be a PITA to maintain the list of binary packages, and using a regex to 
exclude packages won't help because it may cause false negatives.

And of course, only old versions of PHP itself will trigger the warning (not 
even etch's version trigger it), so it should  be just fine not to exclude 
anything.

Cheers,
-- 
Raphael Geissert - Debian Maintainer
www.debian.org - get.debian.net


php_licences.mbox
Description: application/mbox


signature.asc
Description: This is a digitally signed message part.


Processed: Re: Bug#498875: lintian: please detect 2.x licences and warn

2008-11-29 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

 tag 498875 - moreinfo
Bug#498875: lintian: please detect PHP 2.x licences and warn
Tags were: moreinfo patch
Tags removed: moreinfo

 thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


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



Re: new set of changes

2008-11-29 Thread Raphael Geissert
Raphael Geissert wrote:

 Frank Lichtenheld wrote:
 
 On Wed, Jul 30, 2008 at 08:45:08PM -0500, Raphael Geissert wrote:
 Hi all,
 
 Attached is a patch making the following changes:
 * correctly parse line continuations
 * avoid trying to perform any extra check on version 1 watch files
 * know about versionmangle when checking if there is any mangling because
 of $repack
 * add line information to some of the tags
 * attempt to detect when watch file tries to access a sf.net mirror
 directly (projectfoo.sf.net/some_file-(.+) and similar of course don't
 cause false positives)
 * debian-watch-file-specifies-wrong-upstream-version
 * debian-watch-file-specifies-old-upstream-version
 
 I would prefer if you could split that up in separate patches for the
 separate issues. Also if you could submit it in git patch format or
 offer a public git repository to pull from that would make applying
 them easier.
 
 Is a single mbox fine? Attached is one, but doesn't contain the testsuite
 entries.
 
[...]

ping

Cheers,
-- 
Raphael Geissert - Debian Maintainer
www.debian.org - get.debian.net



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



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

2008-11-29 Thread Adam D. Barratt
On Sat, 2008-11-29 at 17:00 +0100, Frank Lichtenheld wrote:
 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.

Thanks for the feedback. I've reimplemented the changes bearing your
suggestions in mind, and attached an updated patch.

Descriptions are now stored along with the rest of the tag data read by
the frontend. I considered doing it directly in Tags.pm but it seemed
cleaner not to have add_tag() modify the tag data directly. The
formatting work itself is all abstracted in Read_taginfo.pm so it can be
reused elsewhere.

The Output module has gained two attributes indicating which tags have
been issued by the module, and whether descriptions should be displayed.

Regards,

Adam
diff --git a/debian/changelog b/debian/changelog
index fea113e..1c1ac9d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,15 +12,26 @@ 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)
 
+  * frontend/lintian:
++ [ADB] Don't call lintian-info when --info is specified.  Set a new
+  flag on the Lintian::Output module instead.
++ [ADB] Add the description to the list of information stored about each
+  tag.
+
   * lib/Lintian/Output.pm:
 + [ADB] Make sure the default list of colours is initialised before
   attempting to use it.  Thanks, gregor herrmann.  (Closes: #507241)
++ [ADB] Maintain a list of tags which have been issued.
++ [ADB] Optionally include the description of a tag when displaying it.
   * lib/Lintian/Output/XML.pm:
 + [ADB] Add a missing angle bracket to the closing tag tag, so that
   the XML is well-formed.
 
   * lib/Lab.pm:
 + [FL] Fix breakage of populate_with_dist() I introduced in 2.1.0.
+  * lib/Read_taginfo.pm:
++ [ADB] Move the work of formatting a tag's description to a separate
+  function so that it can be called from multiple locations.
   * lib/Tags.pm:
 + [ADB] Don't output a Processing binary package foo.changes message.
   Thanks Sandro Tosi for pointing the issue out.
diff --git a/frontend/lintian b/frontend/lintian
index fe9a823..66beaba 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -29,7 +29,6 @@ use FileHandle;
 # }}}
 
 # {{{ Global Variables
-my $lintian_info_cmd = 'lintian-info'; #Command to run for ?
 my $LINTIAN_VERSION = VERSION;	#External Version number
 my $BANNER = Lintian v$LINTIAN_VERSION; #Version Banner - text form
 my $LAB_FORMAT = 8;		#Lab format Version Number
@@ -473,10 +472,6 @@ if (defined $LINTIAN_ROOT) {
 unless ($LINTIAN_ROOT =~ m,^/,) {
 	$LINTIAN_ROOT = $cwd/$LINTIAN_ROOT;
 }
-# see if it has a frontend directory
-if (-d $LINTIAN_ROOT/frontend) {
-$lintian_info_cmd = $LINTIAN_ROOT/frontend/lintian-info;
-}
 } else {
 $LINTIAN_ROOT = '/usr/share/lintian';
 }
@@ -626,6 +621,7 @@ require Lab;
 
 require Util;
 require Read_pkglists;
+require Read_taginfo;
 
 import Util;
 
@@ -663,6 +659,7 @@ $Lintian::Output::GLOBAL-verbose($verbose);
 $Lintian::Output::GLOBAL-debug($debug);
 $Lintian::Output::GLOBAL-quiet($quiet);
 $Lintian::Output::GLOBAL-color($color);
+$Lintian::Output::GLOBAL-showdescription($lintian_info);
 
 # Print Debug banner, now that we're finished determining
 # the values and have Lintian::Output available
@@ -680,7 +677,8 @@ debug_msg(1,
 
 my @l_secs = read_dpkg_control($LINTIAN_ROOT/checks/lintian.desc);
 shift(@l_secs);
-map { $_-{'script'} = 'lintian'; Tags::add_tag($_) } @l_secs;
+map { $_-{'script'} = 'lintian'; $_-{'description'} =
+  format_tag_description($_, 3); Tags::add_tag($_) } @l_secs;
 
 $Tags::show_experimental = $display_experimentaltags;
 $Tags::show_overrides = $show_overrides;
@@ -747,29 +745,6 @@ $LINTIAN_LAB = $LAB-{dir};
 
 # }}}
 
-# {{{ Setup the lintian-info pipe
-
-# pipe output through lintian-info?
-# note: if any E:/W: lines are added above this point, this block needs to
-#   be moved up
-if ($lintian_info) {
-open(OUTPUT_PIPE, '|-', $lintian_info_cmd) or fail(cannot open output pipe to $lintian_info_cmd: $!);
-$Lintian::Output::GLOBAL-stdout(\*OUTPUT_PIPE);
-}
-
-# Close the OUTPUT_PIPE in an END block so that we can ensure that
-# lintian-info exits before we do.  Otherwise, we may get output from
-# lintian-info after lintian exits, which can confuse the shell output.
-END {
-if ($lintian_info) {
-	my $status = $?;
-	close OUTPUT_PIPE;
-	$Lintian::Output::GLOBAL-stdout(\*STDOUT);
-	$? = $status;
-}
-}
-# }}}
-
 # {{{ Compile list of files to process
 
 $schedule 

Bug#507331: lintian fails at being pendantic

2008-11-29 Thread Micah Anderson
Package: lintian
Version: 2.0.0
Severity: minor

If lintian is going to be pendantic, please be correct:
 spelling-error-in-changelog dont don\'t

i didn\'t know thats how you were supposed to spell it, but we\'d all
be smarter if that\'s how it is done, now wouldn\'t we?

micah

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-vserver-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.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.46-1   produces graph of changes introduc
ii  dpkg-dev1.14.23  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  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-18Larry Wall's Practical Extraction 

lintian recommends no packages.

Versions of packages lintian suggests:
pn  binutils-multiarchnone (no description available)
ii  libtext-template-perl 1.44-1.2   Text::Template perl module
ii  man-db2.5.2-3on-line manual pager

-- no debconf information



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

2008-11-29 Thread Russ Allbery
The following commit has been merged in the master branch:
commit a869088dd1e5fbfcd94bd1efb3bbfee4f080886e
Author: Russ Allbery [EMAIL PROTECTED]
Date:   Sat Nov 29 20:51:49 2008 -0800

Don't needlessly escape apostrophes in spelling corrections

* lib/Spelling.pm:
  + [RA] Don't add unnecessary backslashes in the list of spelling
corrections.  They're copied into the output.  Thanks, Micah
Anderson.  (Closes: #507331)

diff --git a/debian/changelog b/debian/changelog
index fea113e..69df061 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,6 +21,10 @@ lintian (2.1.1) unstable; urgency=low
 
   * lib/Lab.pm:
 + [FL] Fix breakage of populate_with_dist() I introduced in 2.1.0.
+  * lib/Spelling.pm:
++ [RA] Don't add unnecessary backslashes in the list of spelling
+  corrections.  They're copied into the output.  Thanks, Micah
+  Anderson.  (Closes: #507331)
   * lib/Tags.pm:
 + [ADB] Don't output a Processing binary package foo.changes message.
   Thanks Sandro Tosi for pointing the issue out.
diff --git a/lib/Spelling.pm b/lib/Spelling.pm
index 326ea96..2fc5776 100644
--- a/lib/Spelling.pm
+++ b/lib/Spelling.pm
@@ -109,7 +109,7 @@ our %CORRECTIONS = qw(
   cryptocraphic cryptographic
   deamon daemon
   debain Debian
-  debians Debian\'s
+  debians Debian's
   decompres decompress
   definate definite
   definately definitely
@@ -127,7 +127,7 @@ our %CORRECTIONS = qw(
   documentaion documentation
   docuentation documentation
   documantation documentation
-  dont don\'t
+  dont don't
   easilly easily
   ecspecially especially
   edditable editable
@@ -214,7 +214,7 @@ our %CORRECTIONS = qw(
   necesary necessary
   nescessary necessary
   noticable noticeable
-  o\'caml OCaml
+  o'caml OCaml
   optionnal optional
   orientatied orientated
   orientied oriented
diff --git a/testset/binary/debian/control b/testset/binary/debian/control
index 7aecae8..03cc317 100644
--- a/testset/binary/debian/control
+++ b/testset/binary/debian/control
@@ -19,7 +19,7 @@ Description: test handling of binary files
  is checked for picky spelling errors.
  .
  This package list [ subversion | gconf ] should not be flagged as a spelling
- mistake.
+ mistake.  The spelling correction for dont should be correct.
  .
   Homepage: http://lintian.debian.org/
 
diff --git a/testset/tags.binary b/testset/tags.binary
index 33b28ff..b525026 100644
--- a/testset/tags.binary
+++ b/testset/tags.binary
@@ -116,6 +116,7 @@ W: binary: old-fsf-address-in-copyright-file
 W: binary: package-contains-hardlink usr/bar2 - usr/share/baz
 W: binary: package-contains-upstream-install-documentation 
usr/share/doc/binary/INSTALL
 W: binary: spelling-error-in-description debian Debian
+W: binary: spelling-error-in-description dont don't
 W: binary: spelling-error-in-doc-base-abstract-field binary:10 speling spelling
 W: binary: spelling-error-in-doc-base-title-field binary:2 debian Debian
 W: binary: spelling-error-in-news-debian speling spelling

-- 
Debian package checker


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



Bug#507331: lintian fails at being pendantic

2008-11-29 Thread Russ Allbery
Micah Anderson [EMAIL PROTECTED] writes:

 Package: lintian
 Version: 2.0.0
 Severity: minor

 If lintian is going to be pendantic, please be correct:
  spelling-error-in-changelog dont don\'t

 i didn\'t know thats how you were supposed to spell it, but we\'d all
 be smarter if that\'s how it is done, now wouldn\'t we?

Heh.  :)  Thanks, will be fixed in the next release.

-- 
Russ Allbery ([EMAIL PROTECTED])   http://www.eyrie.org/~eagle/



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



Bug#507331: setting package to lintian, tagging 507241, tagging 507331

2008-11-29 Thread Russ Allbery
# Automatically generated email from bts, devscripts version 2.10.35
# via tagpending 
#
# lintian (2.1.1) unstable; urgency=low
#
#  * lib/Lintian/Output.pm:
#+ [ADB] Make sure the default list of colours is initialised before
#  attempting to use it.  Thanks, gregor herrmann.  (Closes: #507241)
#  * lib/Spelling.pm:
#+ [RA] Don't add unnecessary backslashes in the list of spelling
#  corrections.  They're copied into the output.  Thanks, Micah
#  Anderson.  (Closes: #507331)
#

package lintian
tags 507241 + pending
tags 507331 + pending




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



Processed: setting package to lintian, tagging 507241, tagging 507331

2008-11-29 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

 # Automatically generated email from bts, devscripts version 2.10.35
 # via tagpending
 #
 # lintian (2.1.1) unstable; urgency=low
 #
 #  * lib/Lintian/Output.pm:
 #+ [ADB] Make sure the default list of colours is initialised before
 #  attempting to use it.  Thanks, gregor herrmann.  (Closes: #507241)
 #  * lib/Spelling.pm:
 #+ [RA] Don't add unnecessary backslashes in the list of spelling
 #  corrections.  They're copied into the output.  Thanks, Micah
 #  Anderson.  (Closes: #507331)
 #
 package lintian
Ignoring bugs not assigned to: lintian

 tags 507241 + pending
Bug#507241: lintian: --color not working any more
There were no tags set.
Tags added: pending

 tags 507331 + pending
Bug#507331: lintian fails at being pendantic
There were no tags set.
Tags added: pending


End of message, stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


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