[arch-general] pacman/libalpm/libfetch do not honor TMPDIR

Tom Gundersen teg at jklm.no
Fri Nov 25 12:57:22 EST 2011


On Fri, Nov 25, 2011 at 6:31 PM, Leonid Isaev <lisaev at umail.iu.edu> wrote:
> On Fri, 25 Nov 2011 18:07:18 +0100
> Geert Hendrickx <geert at hendrickx.be> wrote:
>
>> On Fri, Nov 25, 2011 at 10:55:55 -0600, Leonid Isaev wrote:
>> > Actually, what is stupid is keeping /tmp in RAM. It is an important dir,
>> > where you might have an valuable info in case of a system crash. I could
>> > never understand the logic behind this choice.
>>
>>
>> Reducing disk i/o.
>>
>>
>>       Geert
>>
>>
>
> I find this a very weak excuse, because the normal desktop operation is not
> I/O bound, and the dafaults must be safest. If you compile a lot/use a
> lot of DB stuff, just mount /tmp to RAM in fstab but this is a special case.

Note that:

1) FHS says: "Programs must not assume that any files or directories
in /tmp are preserved between invocations of the program."

2) the contents of /tmp is deleted by initscripts on boot, so if you
want to access stuff in /tmp after an unclean shutdown you somehow
have to circumvent that.

Given the above, there is no reason not to use tmpfs on /tmp (and
plenty of reasons to do so). If extra space is required on /tmp, then
the most efficient solution is to add to the available swap space.

If you have important data, don't put it in /tmp or /var/tmp as
neither has any guarantees about persistence.

-t


More information about the arch-general mailing list