After moving PORTAGE_TMPDIR to /tmp/portage and enabling to wipe /tmp during boot, a following emerge --sync fails:
>>> Starting rsync with rsync://22.214.171.124/gentoo-portage...
>>> Checking server timestamp ...
receiving file list ... done
rsync: push_dir#3 "/tmp/portage" failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(565) [receiver=2.6.9]
!!! Rsync has not successfully finished. It is recommended that you keep
!!! trying or that you use the 'emerge-webrsync' option if you are unable
!!! to use rsync due to firewall or other restrictions. This should be a
!!! temporary problem unless complications exist with your network
!!! (and possibly your system's filesystem) configuration.
Other operations, e.g. world update, already create /tmp/portage on their own.
PORTAGE_TMPDIR is not used for --sync. Maybe you mean PORTDIR? You shouldn't wipe PORTDIR during boot anyway.
Nevermind, I see that it's trying to write the server timestamp file there now.
Created attachment 126976 [details, diff]
use mkstemp instead of using PORTAGE_TMPDIR
If you save this patch as /tmp/mkstemp.patch then you can apply it like this:
patch /usr/lib/portage/bin/emerge < /tmp/mkstemp.patch
Patch works perfectly, thanks.
BTW: It's 10 lines off on current ~ portage ;)
This has been released in 126.96.36.199.