chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] A native scheme install


From: .alyn.post.
Subject: Re: [Chicken-hackers] [PATCH] A native scheme install
Date: Tue, 29 Jan 2013 08:42:36 -0701

On Tue, Jan 29, 2013 at 04:15:13PM +0100, Michele La Monaca wrote:
> > Doesn't this create a bootstrapping problem while installing Chicken?
> > Chicken needs a working install to install the runtime system, but
> > your install needs the runtime system to be able to run...
> 
> If the build succeeds you have your runtime system under your feet. If
> the build fails you've got nothing to install.
> 
> > This would be nice to have, indeed.  But at what cost?
> 
> It does work, or it doesn't. I don't see any associated cost. Am I
> missing anything?
> 
> > This seems unneccessary to me.  A BSD install simply always overwrites
> > a file (unless -b is given and it will unconditionally backup the file).
> 
> Correct. Not strictly necessary, but I would prefer to have that
> feature (not overwriting a file if already installed and identical to
> the source) rather than not.
> 

I broadly support the sentiment here, as there is a feature of make
that has driven me crazy for years: if you have the dependency chain
a <- b <- c, rebuild b from c to an identical copy of itself, make
will still rebuild a even though it too will produce the same result.
That 'feature' has wasted a lot of time in my life, in total.

If you'll permit me to split hairs, I will point out that checking
for equivalence before writing a file is a race condition: the file
may be equal during your check but them be modified later, or the
file may be unequal during your check and equal by the time you
fire copy-file.  This install.scm makes the assumption that a path
is equal to an fd and that relationship is stable during the
program's runtime, where at least the install on my system (OpenBSD,
/usr/src/usr.bin/xinstall) is more cautious about these sorts of
things, using fchown and fchmod, as well as rename to ensure as best
it possibly can that it is working atomically.

-Alan
-- 
my personal website: http://c0redump.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]