cygport: patches welcome?

Eric Blake
Fri Jul 13 03:38:00 GMT 2007

Hash: SHA1

According to Andrew Schulman on 7/12/2007 12:26 PM:
> (2) Smarter update of config files.  In cygport's make_etc_defaults
> function, we have a golden opportunity to fix a problem that's persisted for
> a long time in Cygwin:  when a package's default config file (typically in
> /etc) is updated, we don't currently have a standard way of automatically
> and safely installing the new version, because just copying it into /etc
> would destroy any of the user's existing customizations.  Our current best
> practice is to put
> [ -f /etc/file ] || cp /etc/defaults/etc/file /etc

But when coupled with preremove scripts, this is the right approach.
Provided, of course, that the pre-remove does:

cmp -s /etc/file /etc/defaults/etc/file && rm /etc/file

or similar, which removes the file only if it is unmodified, so that the
followon postinstall will only install the file if the user never touched
it prior to the upgrade.

But yes, since this is a common idiom, patches to cygport to make it
standardized and simpler for maintainers to do are worth posting, even if
Yaakov doesn't incorporate them immediately (after all, cygport is open
source, so anyone else can at least apply the patches locally).

- --
Don't work too hard, make some time for fun as well!

Eric Blake   
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list