On Fri, Mar 31, 2006 at 09:13:02AM +0200, Michael Tautschnig wrote:
> [...]
> > 
> > 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

well, this is why I have implemented preinst:
preinst acts on a temporary copy, which is then compared to the installed
file by fcopy. the installed file is only overwritten and postinst is only
called if fcopy detects a difference.

> 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.
well, _if_ you use preinst and postinst, only preinst should fill in the
template. postinst is there for restarting the daemons.

> 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.
I am currently using a mixture: -P is ignored for the files where a preinst
exists, while for most of the files I am still using the -P logic and a
postinst (I just don't have enough time to change the configuration).
but anyways: abolishing -P in case of my configuration would have quite an
impact on the runtime of a softupdate ;)

shortly speaking: -P should stay in, but maybe a warning should be added
somewhere about the template substitution...

-- 
c u
henning

Attachment: signature.asc
Description: Digital signature

Reply via email to