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