lintian: r240 - in trunk: debian frontend lib
Author: jeroen
Date: 2004-05-01 18:45:44 +0200 (Sat, 01 May 2004)
New Revision: 240
Added:
trunk/lib/Lab.pm
Modified:
trunk/debian/changelog
trunk/frontend/lintian
Log:
* frontend/lintian:
+ [JvW] Factorize some code out of the (huge) lintian file into some libs
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2004-05-01 13:30:23 UTC (rev 239)
+++ trunk/debian/changelog 2004-05-01 16:45:44 UTC (rev 240)
@@ -17,11 +17,14 @@
change to frontend/lintian on every version number change... Requires
sed version 4 at build-time.
+ * frontend/lintian:
+ + [JvW] Factorize some code out of the (huge) lintian file into some libs
+
* testset/filenames:
+ [JvW] Fix two lintian warnings in lintian itself by touching files only
on clean target, and not distributing them in the source
- -- Debian Lintian Maintainers <lintian-maint@debian.org> Sat, 01 May 2004 15:29:49 +0200
+ -- Debian Lintian Maintainers <lintian-maint@debian.org> Sat, 01 May 2004 18:45:13 +0200
lintian (1.23.0) unstable; urgency=low
Modified: trunk/frontend/lintian
===================================================================
--- trunk/frontend/lintian 2004-05-01 13:30:23 UTC (rev 239)
+++ trunk/frontend/lintian 2004-05-01 16:45:44 UTC (rev 240)
@@ -449,13 +449,6 @@
$ENV{'LINTIAN_DEBUG'} = $debug;
-# Now that we have LINTIAN_ROOT we can import our own perl libraries
-unshift @INC, "$ENV{'LINTIAN_ROOT'}/lib";
-require Util;
-require Pipeline;
-require Read_pkglists;
-use vars qw(%source_info %binary_info %udeb_info); # from the above
-
# determine requested unpack level
if (defined($unpack_level)) {
# specified through command line
@@ -477,10 +470,17 @@
$LINTIAN_UNPACK_LEVEL = $unpack_level;
$ENV{'LINTIAN_UNPACK_LEVEL'} = $LINTIAN_UNPACK_LEVEL;
-#----------------------------------------------------------------------------
-# Create/Maintain Lab and add any specified Debian Archives (*.debs)
-#----------------------------------------------------------------------------
+# Now that we have LINTIAN_ROOT we can import our own perl libraries
+unshift @INC, "$LINTIAN_ROOT/lib";
+require Lab;
+
+require Util;
+require Pipeline;
+require Read_pkglists;
+
+use vars qw(%source_info %binary_info %udeb_info); # from the above
+
# Print Debug banner
if ($debug) {
print "N: $BANNER\n";
@@ -499,16 +499,16 @@
$SIG{'INT'} = \&interrupted;
$SIG{'QUIT'} = \&interrupted;
+#----------------------------------------------------------------------------
+# Create/Maintain Lab and add any specified Debian Archives (*.debs)
+#----------------------------------------------------------------------------
+
# sanity check:
if (($action ne 'setup-lab') and ($lab_mode eq 'static')) {
# LINTIAN_LAB has to exist in this mode
- unless (-d "$LINTIAN_LAB/binary" &&
- -d "$LINTIAN_LAB/udeb" &&
- -d "$LINTIAN_LAB/source" &&
- -d "$LINTIAN_LAB/info") {
- fail("lintian lab has not been set up correctly (run lintian --setup-lab)");
- }
+ fail("lintian lab has not been set up correctly (run lintian --setup-lab)")
+ unless Lab::is_lab($LINTIAN_LAB);
}
#######################################
@@ -1707,3 +1707,5 @@
$SIG{$_[0]} = 'DEFAULT';
die "N: Interrupted.\n";
}
+
+# vim: sw=4 ts=8 noet
Added: trunk/lib/Lab.pm
===================================================================
--- trunk/lib/Lab.pm 2004-05-01 13:30:23 UTC (rev 239)
+++ trunk/lib/Lab.pm 2004-05-01 16:45:44 UTC (rev 240)
@@ -0,0 +1,37 @@
+# Lab -- Perl laboratory functions for lintian
+# $Id$
+
+# Copyright (C) 1998-2004 Various authors
+#
+# 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., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
+
+package Lab;
+use strict;
+
+sub is_lab {
+ my $labdir = shift;
+
+ return -d "$labdir/binary"
+ && -d "$labdir/udeb"
+ && -d "$labdir/source"
+ && -d "$labdir/info";
+}
+
+
+1;
+
+# vim: ts=4 sw=4 noet
Property changes on: trunk/lib/Lab.pm
___________________________________________________________________
Name: svn:keywords
+ Id
Reply to: