Subject: Re: Upgrading
To: Simon Burge <simonb@telstra.com.au>
From: Chris Jones <cjones@honors.montana.edu>
List: port-pmax
Date: 05/01/1998 11:10:13
On Fri, 1 May 1998, Simon Burge wrote:

> If you decide to upgrade manually, unpack all sets from the root
> directory _except_ the etc.tgz set.  The etc set will overwrite your
> existing configuration and log files.  I usually create a separate
> directory and merge changes manually:

Also, if you upgrade manually, you can (or at least with previous versions
of tar, you could) shoot yourself in the foot very easily by doing a
normal sort of tar.  At one time at least, tar would by default open the
destination file and start writing bytes into it, then close it when it
was done.  If the file it opens is, say, the tar binary itself, which has
a shared text segment, you can create massive trouble when the text
segment on disk changes with respect to the partial text segment in core.
If you "upgrade" shared libraries in this fashion, and they have the same
version numbers as the old ones, *really* fun things start happening.

Instead, you may want to do this:

tar --unlink -x -z -v -p -f foo.tar.gz

The "--unlink" is the key option; it says to unlink the destination file,
if it exists, before writing any data into it.  If the underlying inode is
in use by any running processes, it'll hang around until said processes
exit.

Chris

-------------------------------------------------------------------------------
Chris Jones                                      cjones@rupert.oscs.montana.edu
           Mad scientist in training...
"Is this going to be a stand-up programming session, sir, or another bug hunt?"