delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-0.5 required=5.0 tests=AWL,BAYES_00,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_YG |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
From: | Oleksandr Gavenko <gavenko AT bifit DOT com DOT ua> |
Subject: | Re: How does setup.exe cope with upgrading of already installed packages if there exist modification in installed files? |
Date: | Wed, 19 Oct 2011 17:01:46 +0300 |
Lines: | 68 |
Message-ID: | <j7ml87$9bl$1@dough.gmane.org> |
References: | <j7m7oe$72e$1 AT dough DOT gmane DOT org> <25jt97t858qgm15f1ot2b2m4vgjrq69aqo AT 4ax DOT com> |
Mime-Version: | 1.0 |
User-Agent: | Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 |
In-Reply-To: | <25jt97t858qgm15f1ot2b2m4vgjrq69aqo@4ax.com> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
Note-from-DJ: | This may be spam |
19.10.2011 16:27, Andrew Schulman пишет: >> Also I worry about modification in other config files in /etc >> (like /etc/apache2/httpd.conf). Are they overwritten on package update? > > This is up to each package maintainer. Current best practice - at least, > as of a year or two ago when I asked about it on cygwin-apps I think - is > to include: > > (1) a default config file in /etc/defaults/etc; > (2) a preremove script that removes the existing config file iff it hasn't > change from the default; and > (3) a postinstall script that installs the default config into /etc if no > other config file is already there. > > If all three of those are present, then a package upgrade will replace the > existing config files if and only if they haven't changed since they were > installed. If they have changed, then it's up to the user to merge the old > and new configs. > > cygport provides automatic support for (1) and (3) above if you call e.g. > > make_etc_defaults /etc/lftp.conf > > To complete the set, package maintainers have to separately include a > simple preremove script, e.g. > > if cmp -s /etc/defaults/etc/lftp.conf /etc/lftp.conf > then > /bin/rm /etc/lftp.conf > fi > > The lftp package, for example, includes all three of the above pieces. For > other packages, you'll just have to check each one. If a piece seems to be > missing, you can ask the maintainer if they're willing to add it. > >> How can I be notified about upgrade conflicts? > > Unfortunately, setup doesn't include any way of prompting the user for > action due to conflicts. The postinstall script will either overwrite the > existing config, or it won't. I think it's considered bad practice to > overwrite a config without checking first whether it's been modified; if > you find that a package does that, you should ask the maintainer to fix it. > > Your safest bet is probably to back up all of the configuration before you > upgrade. > >> What for '/etc/defaults' hierarchy was used? > > See above. > Thanks for replay! Seems that /etc/default practice is good. How about templates? For example if package like Mercurial provide WEB templates which I like to customize (fix time format to ISO-8601). Templates lies in /lib/python2.6/site-packages/mercurial/templates/*. If I prepare some fixes to package which list appropriate to write report to? Contact to mail from /usr/share/doc/Cygwin/*.README or separate list used for this purpose? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |