From owner-freebsd-questions Sat Jun 30 16:26:58 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-27-141-144.mmcable.com [24.27.141.144]) by hub.freebsd.org (Postfix) with SMTP id 34F1037B403 for ; Sat, 30 Jun 2001 16:26:55 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 80277 invoked by uid 100); 30 Jun 2001 23:26:54 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15166.24638.607300.286287@guru.mired.org> Date: Sat, 30 Jun 2001 18:26:54 -0500 To: Scott Gerhardt Cc: questions@freebsd.org Subject: Re: Upgrading Ports In-Reply-To: <76071126@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Scott Gerhardt types: > I haven't seen a definitive answer to the following question anywhere: Because there isn't a definitive one. > When upgrading ports, what happens to configuration files i.e. > apache.conf for example? > Does the file get updated as needed to reflect changes in new port, and > are the old setting preserved? Generally, you shouldn't install an updated port on top of the old version. This is liable to leave bits of the old version around in a non-functional state, and also means you probably can't delete the old one without clobbering parts of the new one. You really need to delete the old one, then install the new one. > When I do a pkg_delete (before installing the new port) does the > configuration file get deleted too? If it does, the port is broken. Generally, ports install configfile.sample, telling you to create configfile from it. Personally, I would prefer that they install defaults/configfile, and you created configfile to include any changes. Since each application has it's own idea about how many config files should be read, this isn't possible globally. As you can tell, in these cases the config files aren't updated for the new port - you'll need to do it by hand. On the other hand, automatically updating config files that you let human beings edit is a nontrivial problem. Even if you don't let humans edit the file, it generally requires code that can read the old one and write the new one, which generally means running the program and letting it do the job for you. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message