Subject: File mode changes not properly updated for existing targets

From: spacefrogg <[email-masked]>
Date: Thu, 05 Oct 2023 14:21:04 +0000

Hi,

I've discovered that, once a target was created by a .do file, its file 
modes are no longer properly updated, when the .do file is modified to 
do so. So, I have a target that is supposed to create a shell script. 
Initially, I forgot to make $3 executable. The target exists, now, under 
redo's control. I changed the .do file to add the executable bits to $3 
and ran redo again but nothing happened. After I deleted the target and 
ran redo again, the target was created with the proper file modes.

Could it be, that you are doing "cat" instead of "mv" on an existing 
target to avoid changing the inode? If so, be aware that the change from 
the old target to the new target would generally no longer be atomic to 
the outside world. POSIX only guarantees atomicity for mv and various 
filesystems have a very limited understanding of the atomicity of the 
write syscall.

Kind regards,
–Michael