Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 187806 - emerge should create its temp-dir also for --sync
Summary: emerge should create its temp-dir also for --sync
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
Keywords: InVCS
Depends on:
Blocks: 181949 189285
  Show dependency tree
Reported: 2007-08-05 11:43 UTC by Christian Schmidt
Modified: 2007-08-10 22:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

use mkstemp instead of using PORTAGE_TMPDIR (mkstemp.patch,1.19 KB, patch)
2007-08-05 18:10 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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://
>>> 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