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

lintian: r809 - in trunk: checks depcheck unpack



Author: jaalto
Date: 2007-01-30 14:15:38 +0100 (Tue, 30 Jan 2007)
New Revision: 809

Modified:
   trunk/checks/common_data.pm
   trunk/depcheck/deppages.pl
   trunk/unpack/unpack-binpkg-l1
   trunk/unpack/unpack-binpkg-l2
   trunk/unpack/unpack-srcpkg-l1
   trunk/unpack/unpack-srcpkg-l2
Log:
* checks/common_data.pm
  depcheck/deppages.pl
  unpack/unpack-binpkg-l1
  unpack/unpack-binpkg-l2
  unpack/unpack-srcpkg-l1
  unpack/unpack-srcpkg-l2
  + [JA] Perl -cw fixes. 

  Fixes problems like these:

  ./checks/common_data.pm
  Name "common_data::known_doc_base_formats" used only once: possible typo at ./checks/common_data.pm line 153.
  Name "common_data::known_archive_parts" used only once: possible typo at ./checks/common_data.pm line 58.
  Name "common_data::known_x_metapackages" used only once: possible typo at ./checks/common_data.pm line 148.
  Name "common_data::known_prios" used only once: possible typo at ./checks/common_data.pm line 61.
  Name "common_data::known_binary_fields" used only once: possible typo at ./checks/common_data.pm line 70.
  Name "common_data::known_build_essential" used only once: possible typo at ./checks/common_data.pm line 92.
  Name "common_data::known_sections" used only once: possible typo at ./checks/common_data.pm line 48.
  Name "common_data::non_standard_archs" used only once: possible typo at ./checks/common_data.pm line 42.
  Name "common_data::known_non_us_parts" used only once: possible typo at ./checks/common_data.pm line 56.
  Name "common_data::known_libpngs" used only once: possible typo at ./checks/common_data.pm line 145.
  Name "common_data::known_tks" used only once: possible typo at ./checks/common_data.pm line 139.
  Name "common_data::known_udeb_fields" used only once: possible typo at ./checks/common_data.pm line 76.
  Name "common_data::known_tclxs" used only once: possible typo at ./checks/common_data.pm line 136.
  Name "common_data::known_libstdcs" used only once: possible typo at ./checks/common_data.pm line 127.
  Name "common_data::known_obsolete_fields" used only once: possible typo at ./checks/common_data.pm line 82.
  Name "common_data::known_source_fields" used only once: possible typo at ./checks/common_data.pm line 64.
  Name "common_data::known_tkxs" used only once: possible typo at ./checks/common_data.pm line 142.
  Name "common_data::known_obsolete_packages" used only once: possible typo at ./checks/common_data.pm line 95.
  Name "common_data::known_essential" used only once: possible typo at ./checks/common_data.pm line 86.
  Name "common_data::known_tcls" used only once: possible typo at ./checks/common_data.pm line 133.
  Name "common_data::known_virtual_packages" used only once: possible typo at ./checks/common_data.pm line 102.
  ./depcheck/deppages.pl
  Name "main::LINTIAN_DIST" used only once: possible typo at ./depcheck/deppages.pl line 33.
  Name "main::HTML_TMP_DIR" used only once: possible typo at ./depcheck/deppages.pl line 64.
  Name "main::LINTIAN_ARCHIVEDIR" used only once: possible typo at ./depcheck/deppages.pl line 33.

  ./unpack/unpack-binpkg-l1
  Name "main::verbose" used only once: possible typo at ./unpack/unpack-binpkg-l1 line 41.
  ./unpack/unpack-binpkg-l2
  Name "main::verbose" used only once: possible typo at ./unpack/unpack-binpkg-l2 line 32.
  ./unpack/unpack-srcpkg-l1
  Name "main::verbose" used only once: possible typo at ./unpack/unpack-srcpkg-l1 line 45.
  ./unpack/unpack-srcpkg-l2
  Name "main::verbose" used only once: possible typo at ./unpack/unpack-srcpkg-l2 line 35.



Modified: trunk/checks/common_data.pm
===================================================================
--- trunk/checks/common_data.pm	2007-01-30 07:32:01 UTC (rev 808)
+++ trunk/checks/common_data.pm	2007-01-30 13:15:38 UTC (rev 809)
@@ -12,6 +12,19 @@
 	   %known_doc_base_formats
           );
 
+# To let "perl -cw" test know we use these variables;
+use vars qw
+(
+  %known_archs %known_sections %known_non_us_parts %known_archive_parts
+  %known_prios %known_source_fields %known_binary_fields %known_udeb_fields
+  %known_obsolete_fields %known_essential %known_build_essential
+  %known_obsolete_packages %known_virtual_packages
+  %known_libstdcs %known_tcls %known_tclxs %known_tks %known_tkxs
+  %known_libpngs %known_x_metapackages
+  %non_standard_archs %all_cpus %all_oses
+  %known_doc_base_formats
+);
+
 # simple defines for commonly needed data
 
 # From /usr/share/dpkg/archtable, included here to make lintian results

Modified: trunk/depcheck/deppages.pl
===================================================================
--- trunk/depcheck/deppages.pl	2007-01-30 07:32:01 UTC (rev 808)
+++ trunk/depcheck/deppages.pl	2007-01-30 13:15:38 UTC (rev 809)
@@ -23,6 +23,9 @@
 
 require './config';
 
+# lintian binary will define these
+use vars qw( $LINTIAN_DIST $HTML_TMP_DIR $LINTIAN_ARCHIVEDIR);
+
 @archs = ('i386', 'alpha', 'm68k', 'powerpc', 'sparc', 'arm', 'hurd-i386');
 
 @logfiles = map { "$LOG_DIR/Depcheck-" . $_ } @archs;
@@ -31,9 +34,11 @@
 
 # this stuff is most likely broken
 $BINARY = "$LINTIAN_ARCHIVEDIR/dists/$LINTIAN_DIST/main";
-$DEPCHECKDIR = "$LINTIAN_ROOT/depcheck";
-$DEPCHECK = "$DEPCHECKDIR/dependencies.py";
 
+my $libdir   = defined $LINTIAN_ROOT ? "$LINTIAN_ROOT/" : "";
+$DEPCHECKDIR = "${libdir}depcheck";
+$DEPCHECK    = "$DEPCHECKDIR/dependencies.py";
+
 $ENV{'PYTHONPATH'} = $DEPCHECKDIR;
 
 system("$DEPCHECK $BINARY/binary-i386/Packages >$LOG_DIR/Depcheck-i386") == 0
@@ -136,7 +141,7 @@
     my $inlist = 0;
     my $brokendep;
     my $bug;
-    
+
     while (<REPORT>) {
 	chop;
 	if (s/^\s+//) {
@@ -161,7 +166,7 @@
 	    $inlist = 1;
 	}
     }
-    
+
     if ($inlist) {
 	print(HTML "</UL>\n");
     }

Modified: trunk/unpack/unpack-binpkg-l1
===================================================================
--- trunk/unpack/unpack-binpkg-l1	2007-01-30 07:32:01 UTC (rev 808)
+++ trunk/unpack/unpack-binpkg-l1	2007-01-30 13:15:38 UTC (rev 809)
@@ -24,6 +24,7 @@
 # MA 02110-1301, USA.
 
 use strict;
+use vars qw($verbose);
 
 ($#ARGV == 1) or die "syntax: unpack-binpkg-l1 <base-dir> <deb-file>";
 my $base_dir = shift;
@@ -38,7 +39,7 @@
 (my @stat = stat $file) or fail("$file: cannot stat: $!");
 
 # create directory in lab
-print "N: Creating directory $base_dir ...\n" if $::verbose;
+print "N: Creating directory $base_dir ...\n" if $verbose;
 mkdir("$base_dir", 0777) or fail("mkdir $base_dir: $!");
 mkdir("$base_dir/control", 0777) or fail("mkdir $base_dir/control: $!");
 mkdir("$base_dir/fields", 0777) or fail("mkdir $base_dir/fields: $!");

Modified: trunk/unpack/unpack-binpkg-l2
===================================================================
--- trunk/unpack/unpack-binpkg-l2	2007-01-30 07:32:01 UTC (rev 808)
+++ trunk/unpack/unpack-binpkg-l2	2007-01-30 13:15:38 UTC (rev 809)
@@ -22,6 +22,7 @@
 # MA 02110-1301, USA.
 
 use strict;
+use vars qw($verbose);
 
 ($#ARGV == 0) or fail("syntax: unpack-binpkg-l2 <base-dir>");
 my $base_dir = shift;
@@ -29,7 +30,7 @@
 use lib "$ENV{'LINTIAN_ROOT'}/lib";
 use Pipeline;
 
-print "N: Unpacking binary packages in directory $base_dir ...\n" if $::verbose;
+print "N: Unpacking binary packages in directory $base_dir ...\n" if $verbose;
 mkdir("$base_dir/unpacked", 0777) or fail();
 
 # avoid using dpkg-deb -x; this pipeline is far faster.  I got a factor 2

Modified: trunk/unpack/unpack-srcpkg-l1
===================================================================
--- trunk/unpack/unpack-srcpkg-l1	2007-01-30 07:32:01 UTC (rev 808)
+++ trunk/unpack/unpack-srcpkg-l1	2007-01-30 13:15:38 UTC (rev 809)
@@ -24,6 +24,7 @@
 # MA 02110-1301, USA.
 
 use strict;
+use vars qw($verbose);
 
 ($#ARGV == 1) or die "syntax: unpack-srcpkg-l1 <base-dir> <dsc-file>";
 my $base_dir = shift;
@@ -42,7 +43,7 @@
 my $data = get_dsc_info($file);
 
 # create directory in lab
-print "N: Creating directory $base_dir ...\n" if $::verbose;
+print "N: Creating directory $base_dir ...\n" if $verbose;
 mkdir("$base_dir", 0777) or fail("mkdir $base_dir: $!");
 mkdir("$base_dir/fields", 0777) or fail("mkdir $base_dir/fields: $!");
 

Modified: trunk/unpack/unpack-srcpkg-l2
===================================================================
--- trunk/unpack/unpack-srcpkg-l2	2007-01-30 07:32:01 UTC (rev 808)
+++ trunk/unpack/unpack-srcpkg-l2	2007-01-30 13:15:38 UTC (rev 809)
@@ -22,7 +22,7 @@
 # MA 02110-1301, USA.
 
 use strict;
-
+use vars qw($verbose);
 use FileHandle;
 
 use lib "$ENV{'LINTIAN_ROOT'}/lib";
@@ -32,7 +32,7 @@
 my $base_dir = shift;
 my $unpack_dir;
 
-print "N: Unpacking source package in directory $base_dir ...\n" if $::verbose;
+print "N: Unpacking source package in directory $base_dir ...\n" if $verbose;
 chdir($base_dir);
 
 my $IN = FileHandle->new;



Reply to: