2018-02-15 0:28 GMT+01:00 Ludovic Courtès <l...@gnu.org>:

> Gábor Boskovits <boskov...@gmail.com> skribis:
> > the make-file-writeable function seems a bit too imperative to me, it
> would
> > look better if we could have a with-file-writeable function, so that we
> can
> > constrain the size effect, and more. Moreover if a file is read-only to
> > start with, it might be a good idea to keep it that way anyways. WDYT?
> Now that I found the function in (guix build utils) (thanks for guiding
> me!), I see what you mean.  ‘make-file-writable’ is imperative, true,
> but I’d say that file system operations are imperative in nature.
> A ‘with-file-writeable’ form would give a false sense of “containment” I
> think.  Contrary to what the name suggests, its effect would *not* be
> limited to the dynamic extent of its body, in the current thread;
> instead, the effect would be globally visible on the system.
> Last, the style of (guix build utils) is a lesser concern in a way
> because its primary use case is package builds.  All this code is
> “plumbing” and mostly imperative.
> So, all in all, I’d rather keep it this way.
> Thoughts?
Ok, the keep it this way. Another question, this came up, as
I was trying to find a nice solution to reset-gzip-timestamps failing.
I got different pieces of advice if I should reset the permissions after
resetting the timestamp, but I'm still not sure. It seems that the easiest
way to this would be to just add a call to make-file-writable to the phase
at the beginning, as we finally end up with a read-only one in the store
anyway. I feel that reseting the permissions is unneccesary additional
complexity. WDYT?

> Ludo’.

Reply via email to