quilt-dev
[Top][All Lists]
Advanced

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

Re: [Quilt-dev] tempfiles


From: Andreas Gruenbacher
Subject: Re: [Quilt-dev] tempfiles
Date: Sun, 16 Feb 2003 21:19:39 +0100
User-agent: KMail/1.4.3

On Sunday 16 February 2003 04:03, James Rowe wrote:
>  Are they the bane of your life too?
>
>  configure.in now outputs a reasoning behind failed mktemp -d's.  It
> also tells you about the choice to use tempfile, or in extreme cases
> a less than efficient touch & mkdir based system.

I have changed `touch' to something like:
        set -o noclobber
        echo -n "" > $tempfile
which should be safe. Mkdir is a bit slow, but safe nonetheless. So 
there's no reason for using what seems to be GNU tempfile (I can't find 
an authoritative reference to that, never mind).

Also I have made the internal mktemp look like mktemp from the outside, 
so now the code is even more simple.

>   A new function in patchfns.in has been added to cope with these
> changes, gentemp().  To use it just call gentemp, and it will
> return(if successful) the name of the tempfile.  if you need a
> directory call it with the option '-d' (see diff.in).

This now optionally takes a path name, for cases where we want to 
specify the temp file location.

>   All the files that use tempfiles have been changed to work with
> gentemp().

Kept.

>   diff.in has changed a little, and now places its temp directory in
> /the/ temp directory.  Using the working tree for tempfiles is just
> plain wrong.  Of course this means that the cp command has had the
> links option removed, so it won't cause problems.

I'm not so happy about the overhead that moving all temp files to /tmp 
causes. I was keeping those temp files in the source directory that are 
only renamed/linked, but not actually copied; that way no actual 
copying is involved. This is still an open issue for discussion.

>   When tempfiles are created they now honour the quilt name too as a
> side effect.

Good, kept.

>   Tempfiles should _never_ just be forced to /tmp, so check for
> $TMPDIR initially then fall back on /tmp.  Well, although not
> strictly a fantastic idea this is one time when parsing stdio.h to
> see the defined directory would be silly ;)

Kept as well.

> The fallback tempfile generation system is available to people who
> provide none to configure with '--with-mktemp=none'.  Although it is
> not required by posix standards should we be enforcing 0600 perms on
> those files?  Currently they just use the user's umask.

Yes, 0600 and 0700.

One more thing ... I prefer simple-stupid auto detection of mktemp.


If any of the changes I did to your code offend you: Sorry, it's not 
meant like that. Also I can be convinced about many things ...

--Andreas.





reply via email to

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