delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/07/12/23:38:40

X-Spam-Check-By: sourceware.org
Message-ID: <4696F3CE.9060304@byu.net>
Date: Thu, 12 Jul 2007 21:38:54 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070604 Thunderbird/2.0.0.4 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: cygport: patches welcome?
References: <uhsc93hu2herpu9ioqb98m7upnrnqng6k4 AT 4ax DOT com>
In-Reply-To: <uhsc93hu2herpu9ioqb98m7upnrnqng6k4@4ax.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

-----BEGIN PGP SIGNED MESSAGE-----
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             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGlvPN84KuGfSFAYARArp9AJ441b1RA7MkHS/g+fq4sZ14lVG+NACfTNxj
0SSUbrnQGWSeeKDddKJeLzM=
=SNl9
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019