[SCM] Debian package checker branch, master, updated. 2.5.4-149-g96d6849
The following commit has been merged in the master branch:
commit 96d68490704c41674bf3e1cb8ef3d9382dbdb1ca
Author: Niels Thykier <niels@thykier.net>
Date: Sat Feb 4 18:42:54 2012 +0100
lintian: Allow TMPDIR in the configuration file
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/debian/changelog b/debian/changelog
index 1939a1b..d217e03 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -186,6 +186,7 @@ lintian (2.5.5) UNRELEASED; urgency=low
+ [NT] Removed check loading code. This has been moved into
Lintian::Profile.
+ [NT] Always load a profile.
+ + [NT] Allow TMPDIR in the configuration file.
* frontend/lintian-info:
+ [NT] Support new lintian.log format.
+ [NT] Support new override file format with -a.
diff --git a/frontend/lintian b/frontend/lintian
index b96b6d0..15c168d 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -40,11 +40,13 @@ use Getopt::Long;
#
#### END NOTE ABOUT LINTIAN_ROOT
+# Variables from %opt (defined below) we must export to %ENV
my @MUST_EXPORT = (qw(
LINTIAN_LAB
LINTIAN_ROOT
));
# LINTIAN_DEBUG, but that is handled separately
+# TMPDIR, handled separatedly
# Environment variables Lintian cares about - the list contains
# the ones that can also be set via the config file
@@ -53,12 +55,16 @@ my @MUST_EXPORT = (qw(
# after parsing cmd-line options. A given value in %opt is
# updated to use the ENV variable if the one in %opt is undef
# and ENV has a value.
+#
+# NB: Variables listed here are not always exported - use @MUST_EXPORT
+# for that.
my @ENV_VARS = (
# LINTIAN_CFG - handled manually
# LINTIAN_ROOT - handled manually
qw(
LINTIAN_PROFILE
LINTIAN_LAB
+ TMPDIR
));
@@ -685,6 +691,11 @@ foreach my $var (@MUST_EXPORT) {
}
}
+# We do this manually since the above would set $ENV{TMPDIR} to ''
+# if it was undef and that causes tempdir to give us some "funny"
+# (read: broken) paths.
+$ENV{'TMPDIR'} = $opt{'TMPDIR'} if defined $opt{'TMPDIR'};
+
# If we are running the test suite we should ignore
# user/system profiles.
if ($ENV{'LINTIAN_INTERNAL_TESTSUITE'}){
diff --git a/man/lintian.pod.in b/man/lintian.pod.in
index f114911..0be29da 100644
--- a/man/lintian.pod.in
+++ b/man/lintian.pod.in
@@ -499,7 +499,7 @@ If no lab location is specified via the LINTIAN_LAB environment
variable, configuration, or the B<--lab> command-line option, lintian
defaults to creating a temporary lab directory in I</tmp>. To change
the directory used, set the TMPDIR environment variable to a suitable
-directory.
+directory. TMPDIR can be set in the configuration file.
=item I</usr/share/lintian/checks>
@@ -557,8 +557,9 @@ Lintian will ignore empty lines or lines starting with the
B<#>-character.
Generally options will be the long form of the command-line option
-without the leading dashes. There some exceptions (such as --area),
-where Lintian uses the same name as the environment variable.
+without the leading dashes. There some exceptions (such as
+--profile), where Lintian uses the same name as the environment
+variable.
Lintian only allows a subset of the options specified in the
configuration file; please refer to the individual options in
@@ -575,6 +576,9 @@ the command line. Though some options allow a slightly different
format (i.e. --display-level); these exceptions are explained for the
relevant options in L</OPTIONS>.
+Beyond command line options, it is also allowed to specify the
+environment variable "TMPDIR" in the configuration file.
+
A sample configuration file could look like:
# Sample configuration file for lintian
@@ -582,6 +586,10 @@ A sample configuration file could look like:
# Set the default profile (--profile)
LINTIAN_PROFILE = debian
+ # Set the default TMPDIR for lintian to /var/tmp/lintian
+ # - useful if /tmp is tmpfs with "limited" size.
+ TMPDIR = /var/tmp/lintian/
+
# Show info (I:) tags by default (--display-info)
# NB: this cannot be used with display-level
display-info=yes
--
Debian package checker
Reply to: