4/30 Uninstall for Unix? Assuming you install something with the usual
./configure make make install routine, and later decide, "Fuck that
was the wrong distribution" or the wrong version or whatever. If you
aren't using a package, how do you know that you are removing all
the right stuff before you go to install the other version? I assume
that most big companies must depend on packages made on dev. machines
that are then installed, no? What is a reasonable policy as far as
this stuff goes?
\_ Install packages so that each of them is contained completely
within a separate directory, e.g. /opt/local/packages/pine-4.30,
then create symbolic links from /opt/local/{bin,man.sbin,lib,include}
to the real packages directory. If you need to remove a package
just nuke it's directory. Sure, there are still dangling symbolic
links, but at least you know what package they belong to if you
want to remove it. See how /opt/local/ is setup on OCF for example.
\_ Another neat idea would be to have a subdirectory within
/opt/local/packages/pine-4.30 called consolidated-links, or
something like that, which contains symbolic links to those
other symbolic links you were talking about. That way, when
you decide to trash a "package" you can run a little script
that will readlink and rm each link so that you won't have
dangling links.
\_ There's a package called opt_depot which manages a link
farm (in /usr/local/{bin,man,lib} by default) based on
installations in a package (or "depot") directory like
the above. http://www.arlut.utexas.edu/csd/opt_depot.
-tom
\_ Here's my little scheme, its similar to OCFs:
0. mkdir /usr/pubsw/ and required subdirs:
{bin,sbin,include,lib,libexec,share,etc,pgms,src}
(you only need to do this once)
1. untar your the source for your program into
/usr/pubsw/src/<program>/<program>-<version>
2. ./configure your program with prefix set to
/usr/pubsw/pgms/<program>/<program>-<version>
3. make && make install
4. cd into /usr/pubsw/pgms/<program> and ln -s
<program>-<version> to <program> (remove the
old link if you have one)
5. for new programs cd into /usr/pubsw and foreach
of the {bin,sbin,include,lib,libexec,share,etc} <dirs>
ln -s ../pgms/<program>/<program>/<dir>/* .
Now to acutally use the programs and libraries, all you
have to do is set PATH and LD_LIBRARY_PATH to point to
the /usr/pubsw/{bin,sbin} and /usr/pubsw/lib dirs.
To upgrade a pkg, you just download the new source, build
it, make install and change one symlink. To uninstall a
pkg just remove its directory. To downgrade, just change
one link.
The other advantages are that the top level directory is
clean (less overhead on directory reads) and source and
programs are stored using similar naming conventions making
it easy to track down problems and do upgrades, etc.
I'm giving you the brief version here. The full setup
also handles multiple architectures and OS revisions and
has some perl tools for cleaning up and installing. |