Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 187806

Summary: emerge should create its temp-dir also for --sync
Product: Portage Development Reporter: Christian Schmidt <gentoo>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 181949, 189285    
Attachments: use mkstemp instead of using PORTAGE_TMPDIR

Description Christian Schmidt 2007-08-05 11:43:08 UTC
After moving PORTAGE_TMPDIR to /tmp/portage and enabling to wipe /tmp during boot, a following emerge --sync fails:

[~]>emerge --sync
>>> Starting rsync with rsync://195.47.195.234/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.

Reproducible: Always
Comment 1 Zac Medico gentoo-dev 2007-08-05 17:42:52 UTC
PORTAGE_TMPDIR is not used for --sync. Maybe you mean PORTDIR? You shouldn't wipe PORTDIR during boot anyway.
Comment 2 Zac Medico gentoo-dev 2007-08-05 17:45:21 UTC
Nevermind, I see that it's trying to write the server timestamp file there now.
Comment 3 Zac Medico gentoo-dev 2007-08-05 18:10:01 UTC
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
Comment 4 Christian Schmidt 2007-08-06 13:43:32 UTC
Patch works perfectly, thanks.

BTW: It's 10 lines off on current ~ portage ;)
Comment 5 Zac Medico gentoo-dev 2007-08-10 22:28:49 UTC
This has been released in 2.1.3.4.