Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 127897 - portage should not unlink /etc/profile.env before overwriting it
Summary: portage should not unlink /etc/profile.env before overwriting it
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 115839
  Show dependency tree
 
Reported: 2006-03-28 12:19 UTC by Patrick McLean
Modified: 2006-03-30 03:05 UTC (History)
0 users

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


Attachments
one line patch to make portage resolve symlinks on /etc/profile.env (portage-profile-env-symlink.patch,456 bytes, patch)
2006-03-28 12:32 UTC, Patrick McLean
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick McLean gentoo-dev 2006-03-28 12:19:36 UTC
Currently, portage unlinks /etc/profile.env before recreating it, if /etc/profile.env happens to be a symlink, the symlink will be removed and replaced with a regular file.

This is a huge pain for a diskless system that uses symlinks in /etc for files that need to be writeable on the nodes.

If not unlinking is not feasable, portage could resolve the symlink before writing the file.
Comment 1 Patrick McLean gentoo-dev 2006-03-28 12:32:36 UTC
Created attachment 83323 [details, diff]
one line patch to make portage resolve symlinks on /etc/profile.env
Comment 2 Zac Medico gentoo-dev 2006-03-28 13:45:24 UTC
Thanks for the patch.  This should go in 2.1_pre7-r3.
Comment 3 Zac Medico gentoo-dev 2006-03-29 01:10:19 UTC
I've added a fix in r3034 so that symlinks are automatically followed inside atomic_ofstream. If an error occurs opening the file, it will fall back and try again (without following the symlink).
Comment 4 Zac Medico gentoo-dev 2006-03-30 03:05:58 UTC
Released in 2.1_pre7-r3.