1 |
On Mon, 2007-01-29 at 09:38 +0200, Alan McKinnon wrote: |
2 |
> On Saturday 27 January 2007 18:40, Vlad Dogaru wrote: |
3 |
> > One question though: is there a reason why PORTAGE_TMPDIR does not |
4 |
> > default to /tmp? |
5 |
|
6 |
I've been running PORTAGE_TMPDIR in /tmp for at least a couple of years |
7 |
without any issues (actually /var/tmp/portage, but /var/tmp symlinks |
8 |
to /tmp on most of my systems). |
9 |
|
10 |
> The real nature of /tmp isn't adequate for portage, that's why it uses a |
11 |
> different one. If memory serves, the FHS defines /tmp as a temporary |
12 |
> place to store files, and the continued existence of the file after a |
13 |
> process has finished is not guaranteed. In other words, if there are no |
14 |
> existing locks on a file, it's up for summary deletion. This could be |
15 |
> fatal in a big compile - imagine if some cleaner process nuked a binary |
16 |
> compiled 4 hours ago in an openoffice compile.... |
17 |
|
18 |
I'm not sure if your memory is correct, but I've always been told |
19 |
"never put anything in /tmp that you want to survive a reboot". But |
20 |
still using your def I suppose that process would be 'emerge' which, on |
21 |
the default config, deletes the files before it finishes anyway. |
22 |
|
23 |
Most cleaners have sane mtime/atime parameters that they don't interfere |
24 |
with merges. The the default Gentoo tmpwatch config for /tmp is 168 |
25 |
(336 hrs for /var/tmp/portage). I've never had an emerge take 168 hours. |
26 |
If you do, you can adjust that parameter. I do also have DISTDIR |
27 |
pointing to /var/portage/distfiles and I have a different policy for |
28 |
tmpwatch for that. |
29 |
|
30 |
> But the best reason is that some compiles are HUGE. Openoffice can take |
31 |
> up all of 5G with everything enabled, and as /tmp is often a tmpfs, |
32 |
> it's highly unlikely most users will have enough space on /tmp to |
33 |
> emerge it. |
34 |
|
35 |
Not that that's ever been a problem for me but you can always |
36 |
temporarily divert it when compiling "HUGE" jobs. |
37 |
|
38 |
# PORTAGE_TMPDIR=/var/scratch/portage emerge openoffice |
39 |
|
40 |
IMO it's more than worth the convenience/performance of running it |
41 |
in /tmp than not. As I've said I've been doing it for a long while and |
42 |
I'd don't remember ever having files "disappear" or running out of space |
43 |
on /tmp. |
44 |
|
45 |
But if you want to discuss FHS let's talk about how /usr/portage doesn't |
46 |
belong in /usr ;-) |
47 |
|
48 |
-m |
49 |
|
50 |
-- |
51 |
gentoo-user@g.o mailing list |