[...]
> 
> The -P option of fcopy can not detect changes of the value of a
> variables, that is used in a preinst or postinst script. Therefore, if
> you use some sort of variable substitution in the {pre,post}inst
> script, but neither the template itself nor these scripts had changed,
> but only the value of a variable, fcopy will not update this file when
> using the -P option.
> 
> I recommend to remove this flag. fcopy can always detect if something
> has changed without using the -P flag. IMO it also does not save time
> calling fcopy with -P. Calling fcopy in the default manner will not
> take much more time.
>

If templates are used, as described above, fcopy will copy the file each time,
even if nothing has changed. The only way to do it correctly would be copying
the template to some temporary file, then running {pre,post}inst on this file,
then do the diff ... However, the scripts might have sideeffects, such as
restarting a service. And, IMHO, it is this particular effect why one would not
want fcopy to do its job again and again, if the template had not been changed.

Still, I see no reason why this option has to be removed - using templates and
the -P option is probably the most advanced use of fcopy today, and those using
it should be aware of the fact that changes to variables are not detected by
fcopy.

Regards,
Michael

Attachment: signature.asc
Description: Digital signature

Reply via email to