Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jun 2001 18:26:54 -0500
From:      Mike Meyer <mwm@mired.org>
To:        Scott Gerhardt <scott@gerhardt-it.com>
Cc:        questions@freebsd.org
Subject:   Re: Upgrading Ports
Message-ID:  <15166.24638.607300.286287@guru.mired.org>
In-Reply-To: <76071126@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
Scott Gerhardt <scott@gerhardt-it.com> 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.

	<mike
--
Mike Meyer <mwm@mired.org>			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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15166.24638.607300.286287>