This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How does setup.exe cope with upgrading of already installed packages if there exist modification in installed files?

On Wed, 2011-10-19 at 09:27 -0400, Andrew Schulman wrote:
> This is up to each package maintainer.  Current best practice - at least,
> as of a year or two ago when I asked about it on cygwin-apps I think - is
> to include:
> (1) a default config file in /etc/defaults/etc;
> (2) a preremove script that removes the existing config file iff it hasn't
> change from the default; and
> (3) a postinstall script that installs the default config into /etc if no
> other config file is already there.
> If all three of those are present, then a package upgrade will replace the
> existing config files if and only if they haven't changed since they were
> installed.  If they have changed, then it's up to the user to merge the old
> and new configs.
> cygport provides automatic support for (1) and (3) above if you call e.g.
>   make_etc_defaults /etc/lftp.conf
> To complete the set, package maintainers have to separately include a
> simple preremove script, e.g.

Actually, cygport handles (2) as well.  No further intervention should
be necessary once make_etc_defaults is called.


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]