Copy-on-write for develop
Asheesh Laroia
asheesh at creativecommons.org
Sun Jan 6 04:08:26 EST 2008
On Sat, 5 Jan 2008, Jameson \"Chema\" Quinn wrote:
>> Jameson "Chema" Quinn wrote:
>>> Does anyone know if it is possible for Sugar to support something like
>>> this? That is, if it there's any way - either file-system-native or
>>> through some strap-on - to safely hand a link to a process so that
>>> (either magically or manually) it can replace the link with a local copy
>>> if needed, but it CANNOT modify the original file?
>>
>> In the interest of simplicity, why not just use UNIX permissions and
>> simple
>> editor logic?
>>
>> The activity's files are all read-only to non-root. Just read them into
>> the
>> editor. If the user makes a change, save it as a new file, with
>> appropriate
>> permissions.
>>
>> - --Ben
>
>
> This is one option. The problem is that the activity could depend on having
> the right file names. So to do this, I think I'd have to make a copy of the
> directory structure filled with activity-owned symbolic links, to be able to
> delete and overwrite with the local copy. Some activities would probably
> break even then, too, because of the difference between symbolic and hard
> links.
I think you could use hard links instead of symlinks. I think that would
be better, and it would provide the same semantics as the original files.
(I further think you'd need to duplicate the directory structure
yourself.)
-- Asheesh.
P.S. Plague of backslashes in your email address?
--
NEVER RESPOND TO CRITICAL PRESS. IT IS A GAME YOU CAN ONLY LOSE, AND IT
MAKES US LOOK BAD.
-- Bruce Perens
More information about the Devel
mailing list