I have my /var/tmp mounted as a ramdisk. This works for most applications, but there's not enough room for Libre Office. I've worked around this in the past by symlinking /var/tmp/portage/app-office to another tmp dir on my hard drive. However libreoffice-3.4.5.2 fails with the following error: >>> Running pre-merge checks for app-office/libreoffice-3.4.5.2 * Checking for at least 1 gibibytes RAM ... [ ok ] * Checking for at least 9 gibibytes disk space at "/var/tmp/portage/app-office/libreoffice-3.4.5.2/temp" ... [ ok ] Traceback (most recent call last): File "/usr/bin/emerge", line 43, in <module> retval = emerge_main() File "/usr/lib64/portage/pym/_emerge/main.py", line 2032, in emerge_main myopts, myaction, myfiles, spinner) File "/usr/lib64/portage/pym/_emerge/actions.py", line 444, in action_build retval = mergetask.merge() File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1020, in merge rval = self._run_pkg_pretend() File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 949, in _run_pkg_pretend build_dir.unlock() File "/usr/lib64/portage/pym/_emerge/EbuildBuildDir.py", line 99, in unlock os.rmdir(self._catdir) File "/usr/lib64/portage/pym/portage/__init__.py", line 230, in __call__ rval = self._func(*wrapped_args, **wrapped_kwargs) OSError: [Errno 20] Not a directory: '/var/tmp/portage/app-office' Reproducible: Always Steps to Reproduce: 1. Create a symlink /var/tmp/portage/app-office that points to a suitable temp directory. 2. 'emerge libreoffice' 3. Actual Results: A fatal Python exception. Expected Results: libreoffice to compile and install properly from the symlinked folder emerge --resume --skipfirst doesn't help in this situation, since its failing in the pre-merge check section.
Please post your `emerge --info' output in a comment.
You should probably simply symlink /var/tmp/portage or just set PORTAGE_TMPDIR properly (in /etc/portage/env/app-office/libreoffice), but emerge should probably handle it properly too.
/etc/portage/env/app-office/libreoffice won't work. You have to use something like this in /etc/portage/package.env: app-office/* app-office.conf And something like this in /etc/portage/env/app-office.conf: PORTAGE_TMPDIR=/some/other/temp/dir
(In reply to comment #0) > File "/usr/lib64/portage/pym/_emerge/EbuildBuildDir.py", line 99, in unlock > os.rmdir(self._catdir) > File "/usr/lib64/portage/pym/portage/__init__.py", line 230, in __call__ > rval = self._func(*wrapped_args, **wrapped_kwargs) > OSError: [Errno 20] Not a directory: '/var/tmp/portage/app-office' We can reduce this to a warning, but if you have sandbox enabled (it is by default), then the symlink is going to trigger a sandbox access violation because sandbox de-references symlinks in order to perform access checks.
Zac's suggestion worked like a charm. Its probably the better solution, considering I no longer have to remember to re-create the symlink whenever there is a Libre Office update.
(In reply to comment #0) > File "/usr/lib64/portage/pym/_emerge/EbuildBuildDir.py", line 99, in unlock > os.rmdir(self._catdir) > File "/usr/lib64/portage/pym/portage/__init__.py", line 230, in __call__ > rval = self._func(*wrapped_args, **wrapped_kwargs) > OSError: [Errno 20] Not a directory: '/var/tmp/portage/app-office' It's fixed in git to ignore the rmdir failure: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ed68a1bdb22fec478ac39b377961508cd3a30617
This is fixed in 2.1.11.14 and 2.2.0_alpha125.