On 24/02/20 08:30, Neil Bothwick wrote: > On Sun, 23 Feb 2020 18:59:27 -0800, Ian Zimmerman wrote: > >> In a desperate act to satisfy the ever increasing build space >> requirements for firefox and its kin, I'd symlinked /var/tmp/portage to >> a subdirectory of /usr/portage. And webrsync does "rsync ... --delete >> ...", so now you see where this is going. >> >> Fortunately, as you say, the recovery was easy once I knew what went >> wrong. >> >>> You might consider moving the sync location out of /usr while you're >>> at it. Also, if you haven't already done so get >>> /usr/portage/distfiles outside of the repo directory. For new >>> installs both of these are moved to /var in non-nested directories, >>> but existing installs will continue to use their present locations. >> >> But I already have a bunch of symlinks to juggle the space requirements >> and I would rather not revisit that, right now. On my system /var is in >> the / filesystem and doesn't have that much space (less than the 8G >> necessary to build firefox). At some future spring cleaning time, >> maybe. > > There's no need for any symlinks, just set $PORTAGE_TMPDIR globally then > separate for greedy packages. For example, in make.conf I have
Ahhh. I didn't know about that trick. > > PORTAGE_TMPDIR="/tmp" > > Then /etc/portage/package.env/firefox contains > > www-client/firefox disk-tmpdir.conf > > and /etc/portage/env/disk-tmpdir.conf contains > > PORTAGE_TMPDIR="/mnt/scratch" > > So I get faster tmpfs based builds for most packages and use a disposable > disk partition for the greedy ones. > I just have a massive swap space, and /var/tmp/portage is a tmpfs. So everything gets a fast tmpfs build, and it spills into swap as required (hopefully almost never). Cheers, Wol