I got this pesty "warning: warning given when extracting .INSTALL (Write
failed)" today, and when looking at pacman, libalpm and libfetch with
strings(1), none of them seem to check TMPDIR!
clemens
11-24-2011, 11:12 PM
Gaetan Bisson
pacman/libalpm/libfetch do not honor TMPDIR
[2011-11-25 00:18:43 +0100] clemens fischer:
> would it be possible to let pacman, libalpm and libfetch honor the
> environment variable TMPDIR?
>
> I mean, this is stupid. Many people keep /tmp in RAM, on a tmpfs, and
> make it big enough, but not too big, as it takes away RAM when getting
> loaded.
>
> #define TMP_LOC "TMPDIR"
> #include <stdlib.h> /* getenv(3) */
> #include <string.h> /* strncat(3) */
> td = getenv(TMP_LOC);
> /* cleanup for safety: td = cleanup(td); */
> tmpdir = strncat(td, "/", 1);
>
> What can be so difficult about this?
If that's easy then it shouldn't be too hard for you to open a bug
report on the tracker and submit a patch.
--
Gaetan
11-24-2011, 11:28 PM
Allan McRae
pacman/libalpm/libfetch do not honor TMPDIR
On 25/11/11 09:18, clemens fischer wrote:
Hi,
would it be possible to let pacman, libalpm and libfetch honor the
environment variable TMPDIR?
I mean, this is stupid. Many people keep /tmp in RAM, on a tmpfs, and
make it big enough, but not too big, as it takes away RAM when getting
loaded.
I got this pesty "warning: warning given when extracting .INSTALL (Write
failed)" today, and when looking at pacman, libalpm and libfetch with
strings(1), none of them seem to check TMPDIR!
File a bug report or at least post to the pacman-dev list. Then
relevant people might actually see your request.
But I do not get it... what is the point of having /tmp in RAM and
then setting TMPDIR elsewhere?
Allan
11-25-2011, 05:04 AM
Hector Martinez-Seara
pacman/libalpm/libfetch do not honor TMPDIR
Hi,
Sometimes you simply need more space that the one available in /tmp.
In all my systems /tmp is in ram and as some machines have only 4Gb
memory the available space in /tmp is about 2Gb only which is
sufficient for most of the stuff but some compilations need more.
Hector
On 25 November 2011 02:28, Allan McRae <allan@archlinux.org> wrote:
> On 25/11/11 09:18, clemens fischer wrote:
>>
>> Hi,
>>
>> would it be possible to let pacman, libalpm and libfetch honor the
>> environment variable TMPDIR?
>>
>> I mean, this is stupid. *Many people keep /tmp in RAM, on a tmpfs, and
>> make it big enough, but not too big, as it takes away RAM when getting
>> loaded.
>>
>> * #define TMP_LOC "TMPDIR"
>> * #include<stdlib.h> */* getenv(3) */
>> * #include<string.h> */* strncat(3) */
>> * td = getenv(TMP_LOC);
>> * /* cleanup for safety: td = cleanup(td); */
>> * tmpdir = strncat(td, "/", 1);
>>
>> What can be so difficult about this?
>>
>> I got this pesty "warning: warning given when extracting .INSTALL (Write
>> failed)" today, and when looking at pacman, libalpm and libfetch with
>> strings(1), none of them seem to check TMPDIR!
>>
>
>
> File a bug report or at least post to the pacman-dev list. *Then relevant
> people might actually see your request.
>
> But I do not get it... * what is the point of having /tmp in RAM and then
> setting TMPDIR elsewhere?
>
> Allan
>
On Thu, Nov 24, 2011 at 5:18 PM, clemens fischer
<ino-news@spotteswoode.dnsalias.org> wrote:
>
> I mean, this is stupid. *Many people keep /tmp in RAM, on a tmpfs, and
> make it big enough, but not too big, as it takes away RAM when getting
> loaded.
there isn't much reason to limit tmpfs or /tmp ... you should be using
a swap device/file/etc to ensure files residing in tmpfs are properly
swapped out in the event memory becomes constrained, or the files are
not in use. however, i would consider it a bug for applications to
store *very* large files (exceeding 50-100M or so) in /tmp -- /var/tmp
would be more appropriate, even for ephemeral/transient files -- idk
what pacman is using /tmp for specifically, but i doubt it's extremely
large *anything* (briefly extract/read the .INSTALL?).
"Some people (including me) find it very convenient to mount it e.g.
on /tmp and /var/tmp and have a big swap partition."
... are you memory constrained? in reality, you want your RAM 90%+
maxed at ALL times (cache/etc) ... the only time RAM is "wasted" is
when it's not being used at all.
--
C Anthony
11-25-2011, 09:19 AM
Tom Gundersen
pacman/libalpm/libfetch do not honor TMPDIR
On Fri, Nov 25, 2011 at 7:04 AM, Hector Martinez-Seara <hseara@gmail.com> wrote:
> Sometimes you simply need more space that the one available in /tmp.
> In all my systems /tmp is in ram and as some machines have only 4Gb
> memory the available space in /tmp is *about *2Gb only which is
> sufficient for most of the stuff but some compilations need more.
I think the correct solution is to use swap (unless it is truly a
one-off case). [But I'm sure the patch would also make sense].
-t
11-25-2011, 09:32 AM
Mauro Santos
pacman/libalpm/libfetch do not honor TMPDIR
On 25-11-2011 07:46, C Anthony Risinger wrote:
> ... however, i would consider it a bug for applications to
> store *very* large files (exceeding 50-100M or so) in /tmp -- /var/tmp
> would be more appropriate, even for ephemeral/transient files -- idk
Just out of curiosity, why do you say that? Is it a good practice rule
or something like that?
--
Mauro Santos
11-25-2011, 03:35 PM
clemens fischer
pacman/libalpm/libfetch do not honor TMPDIR
Allan McRae wrote:
> On 25/11/11 09:18, clemens fischer wrote:
>
>> would it be possible to let pacman, libalpm and libfetch honor the
>> environment variable TMPDIR?
>
> File a bug report or at least post to the pacman-dev list. Then
> relevant people might actually see your request.
I'm not "relevant" enough to post to any dev lists.
> But I do not get it... what is the point of having /tmp in RAM and
> then setting TMPDIR elsewhere?
This has been answered by Hector Martinez-Seara. Sometimes, there's not
enough space in /tmp ...
clemens
11-25-2011, 03:40 PM
clemens fischer
pacman/libalpm/libfetch do not honor TMPDIR
Gaetan Bisson wrote:
> If that's easy then it shouldn't be too hard for you to open a bug
> report on the tracker and submit a patch.
Then what component does the actual extracting? Is it libfetch? That
would be an upstream moving target, because it comes from netbsd. Do
you guys accept patches against libfetch in this case?
clemens
11-25-2011, 03:55 PM
Leonid Isaev
pacman/libalpm/libfetch do not honor TMPDIR
On Fri, 25 Nov 2011 00:18:43 +0100
clemens fischer <ino-news@spotteswoode.dnsalias.org> wrote:
> Hi,
>
> would it be possible to let pacman, libalpm and libfetch honor the
> environment variable TMPDIR?
>
> I mean, this is stupid. Many people keep /tmp in RAM, on a tmpfs, and
> make it big enough, but not too big, as it takes away RAM when getting
> loaded.
>
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.