This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
RE: cygport: patches welcome?
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: <cygwin-apps at cygwin dot com>
- Date: Fri, 13 Jul 2007 11:30:40 +0100
- Subject: RE: cygport: patches welcome?
- References: <uhsc93hu2herpu9ioqb98m7upnrnqng6k4@4ax.com> <4696F3CE.9060304@byu.net> <20070713080048.GK6851@calimero.vinschen.de>
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....
cheers,
DaveK
--
Can't think of a witty .sigline today....