This is the mail archive of the cygwin-apps 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: cygport: patches welcome?


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....


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