Skip site navigation (1)Skip section navigation (2)
Date:      13 Jan 2001 20:27:50 -0600
From:      Lars Eighner <eighner@io.com>
To:        "Casper Andersen" <caspera@sophistic.com>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: does make build|installworld also update ports?
Message-ID:  <86r926vpeg.fsf@dumpster.io.com>
In-Reply-To: "Casper Andersen"'s message of "Sat, 13 Jan 2001 18:45:43 %2B0100"
References:  <007701c07d88$a74a1bd0$f058e7c3@itcollege.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
In our last episode,  <007701c07d88$a74a1bd0$f058e7c3@itcollege.dk>,
the lovely and talented Casper Andersen

CA> when doing a make buildworld && make installworld, how much does
CA> it upgrade.  only the base /usr/src or also the packages installed
CA> via ports and listed in with pkg_info ?

Assuming you are asking about an upgrade (as you say above) the "world"
of buildworld and installworld does *not* include the ports.  It will
not upgrade the ports tree and will not in general rebuild applications
that have been installed with ports.  Sometimes upgrades, especially
across major version number will break some very old ports.  (Or very
new ports will not install on very old versions of the system.)

There are so many ports that attempting to upgrade all applications
with the system would take a long time and would make the upgrade
process excessively complicated.  I've hinted that there are a *few*
situations in which applications will break if they are sufficiently
out of sync with the system, but in more cases, by far, there is
no necessity of upgrading an application with the system, and
since the ports come from diverse places they tend to have their own
upgrade cycles.

There are a number of ways to keep the ports tree current which are
described in the Handbook - cvsup suits many people.  Of course that
will not rebuild the applications in and of themselves.  It is 
pretty much up to you to determine when you want or need to upgrade
individual applications.  You can see what applications you have
installed by checking /var/db/pkg/ .

I recommend the following for upgrading ports, assuming you have
a current ports tree:

1)  Be sure there is anything to upgrade by comparing the version
number in the Makefile of the port with the version you have installed.
You can check the installed version number in /var/db/pkg/ or you
can query most applications to report their own version number with
the -v or -version or whatever switch.

2)  Check the dependencies while you are at the business of checking
the Makefile.  This should give you some idea how much work is involved.
Also when you make the application, the dependencies will be built if
they don't exist.  But this will not remove the old versions, and to
be safe, you want to remove the old installs first.

3)  Copy configuration files of the application and dependencies that
will be changed to a safe place.  This may save a lot of work in
configuring the new versions - in some cases the old configuration
files will work with the new version, but in almost all cases they
will be a helpful reference in configuring the new version.

4) Use pkg_delete to remove the old version of the application and
any dependencies that will be upgraded.  You can't use make deinstall
reliably because the files and directories of the new port will not
necessarily correspond to the old port.

5) Make install the new port.

6) Back up the default configuration files of the installed application
and then compare the old configuration file (which you saved in a safe
place).  You'll have to use your judgment and man to determine how
to reconfigure the application so that it will behave as much like the
old version as possible and users won't whine so much.

-- 
  Lars Eighner           eighner@io.com           http://www.io.com/~eighner/
                    Save the Rainforest! Eat a vegetarian!



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?86r926vpeg.fsf>