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

Bug#787930: [checks/po-debconf] uses TEMPDIR instead of TMPDIR



Package: lintian
Version: 2.5.31
Tags: patch

checks/po-debconf.pm does:

       my $temp_obj = File::Temp->newdir('lintian-po-debconf-XXXXXX',
           DIR => $ENV{'TEMPDIR'}//'/tmp');

But POSIX-compliant variable for temporary directory is TMPDIR, not TEMPDIR.

The attached (untested) patch should fix it.

--
Jakub Wilk
diff --git a/checks/po-debconf.pm b/checks/po-debconf.pm
--- a/checks/po-debconf.pm
+++ b/checks/po-debconf.pm
@@ -148,7 +148,7 @@
 
     if ($missing_files == 0) {
         my $temp_obj = File::Temp->newdir('lintian-po-debconf-XXXXXX',
-            DIR => $ENV{'TEMPDIR'}//'/tmp');
+            TMPDIR => 1);
         my $abs_tempdir = realpath($temp_obj->dirname)
           or croak('Cannot resolve ' . $temp_obj->dirname . ": $!");
         # We need an extra level of dirs, as intltool (in)directly

Reply to: