autoconf-patches
[Top][All Lists]
Advanced

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

Re: How can I get rid of dinkleberry autotools temp dirs?


From: Ralf Wildenhues
Subject: Re: How can I get rid of dinkleberry autotools temp dirs?
Date: Sat, 21 Jan 2006 10:09:23 +0100
User-agent: Mutt/1.5.9i

Sorry for the delay.

* Stepan Kasal wrote on Wed, Jan 11, 2006 at 08:29:15PM CET:
> 
> > >   f=`mktemp -d -q xxxxx`
> 
> actually, the example code in autoconf.texi doesn't contain  -q,
> while te actual code (m4sh.m4, General.pm, and config.guess) has it.
> 
> In any case, we should synch these.

OK, thanks.  I have applied the following patch to fix these issues,
assuming silent agreement to the other part of my proposed change. ;-)

And will send a similar patch for config.guess and gettext to its
respective mailing lists.

Cheers,
Ralf

        * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Do not pass `-q' to mktemp.
        * lib/Autom4te/General.pm (mktmpdir): Likewise.
        (END): Improve error message a bit.
        Reported by Bruce Korb <address@hidden>.

Index: lib/Autom4te/General.pm
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/Autom4te/General.pm,v
retrieving revision 1.34
diff -u -r1.34 General.pm
--- lib/Autom4te/General.pm     14 May 2005 07:00:39 -0000      1.34
+++ lib/Autom4te/General.pm     13 Jan 2006 13:20:18 -0000
@@ -193,11 +193,14 @@
     {
       if (<$tmp/*>)
        {
-         if (! unlink <$tmp/*>)
+         while (<$tmp/*>)
            {
-             print STDERR "$me: cannot empty $tmp: $!\n";
-             $? = 1;
-             return;
+             if (! unlink $_)
+               {
+                 print STDERR "$me: cannot empty $tmp ($_): $!\n";
+                 $? = 1;
+                 return;
+               }
            }
        }
       if (! rmdir $tmp)
@@ -312,7 +315,7 @@
 
   # If mktemp supports dirs, use it.
   $tmp = `(umask 077 &&
-          mktemp -d -q "$TMPDIR/${signature}XXXXXX") 2>/dev/null`;
+          mktemp -d "$TMPDIR/${signature}XXXXXX") 2>/dev/null`;
   chomp $tmp;
 
   if (!$tmp || ! -d $tmp)
Index: lib/m4sugar/m4sh.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sh.m4,v
retrieving revision 1.155
diff -u -r1.155 m4sh.m4
--- lib/m4sugar/m4sh.m4 11 Jan 2006 08:05:55 -0000      1.155
+++ lib/m4sugar/m4sh.m4 13 Jan 2006 13:20:18 -0000
@@ -998,7 +998,7 @@
 [# Create a (secure) tmp directory for tmp files.
 m4_if([$2], [], [: ${TMPDIR=/tmp}])
 {
-  tmp=`(umask 077 && mktemp -d -q "m4_default([$2], [$TMPDIR])/$1XXXXXX") 
2>/dev/null` &&
+  tmp=`(umask 077 && mktemp -d "m4_default([$2], [$TMPDIR])/$1XXXXXX") 
2>/dev/null` &&
   test -n "$tmp" && test -d "$tmp"
 }  ||
 {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]