This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: cygport: patches welcome?
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-apps at cygwin dot com
- Date: Fri, 13 Jul 2007 13:10:36 +0200
- Subject: Re: cygport: patches welcome?
- References: <uhsc93hu2herpu9ioqb98m7upnrnqng6k4@4ax.com> <4696F3CE.9060304@byu.net> <20070713080048.GK6851@calimero.vinschen.de> <012501c7c538$dc0d7b60$2e08a8c0@CAM.ARTIMI.COM>
- Reply-to: cygwin-apps at cygwin dot com
On Jul 13 11:30, Dave Korn wrote:
> On 13 July 2007 09:01, Corinna Vinschen wrote:
>
> > I'm still not sure how to handle situations where the default config
> > file in /etc/defaults/etc has changed between releases, but the user has
> > also changed the copied config file in /etc. We have no mechanism and
> > no standarized way to handle this so far.
>
> diff -u /etc/defaults/etc/prev-config /etc/config | patch --dry-run -p0 \
> /etc/defaults/etc/new-config -o /etc/defaults/etc/config.mrg \
> && ( echo "Use the new one!" ; \
> mv /etc/defaults/etc/config.mrg /etc/config ) \
> || ( echo "You must manually update merge your config files! ; \
> cp /etc/defaults/etc/new-config /etc/config.new )
>
> > Does that sound ok? Any other ideas?
>
> I think it might be worth attempting an auto-merge like the above and use
> the mechanism you describe in the fallback case. The automerge procedure
> needs more thinking out than the outline I've sketched above; we need to look
> through the manifest, grep out the etc/defaults files, run 'file' on them to
> verify that we only attempt to merge plain ascii text files, back up the old
> default config files before unpacking the package tarball, etc. etc....
I'm a bit reluctant to present a generic auto-merge. Consider the
situation where a new version of a package adds a new configuration
setting. An auto-merge would pull in the default setting for this
one, without the user knowing about this (RTFM, yes). It might be
better to let the user decide how to proceed, wouldn't it? Hmm,
on second thought...
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat