[sclug] Keeping track of source installations

David Given dg at cowlark.com
Wed May 5 18:15:48 UTC 2004


erik.chakravarty at accenture.com wrote:
[...]
> "make install" throws binaries and libraries all over your filesystem
> with no way of cleaning everything up again in 6 months time. Is there a
> convenient way of keeping track of what non-debianized packages you have
> installed?

I use the enclosed script (attached 'cos it's only 296 bytes).

1. Place scanpkg in /opt/scanpkg. Ensure that 
/usr/local/{bin,etc,lib,share,man/man1,...} exist.

2. Configure, compile and install your source package with a prefix of 
/opt/packages/<yourpackagename>. So the binaries for fnord v2.1 go in 
/opt/packages/fnord-2.1/bin, etc.

3. As root, run /opt/scanpkg.

scanpkg will look at the contents of /opt/packages and create symlinks 
to populate /usr/local so that all the packages seem to live there. The 
end result is that each package lives in its own subdirectory... but 
appears to be installed in the same place.

To remove a package, simply delete its subdirectory and rerun 
/opt/scanpkg. Any dangling links will be removed.

Neat tricks you can do: create a directory /opt/disabled. Now you can 
temporarily remove a package by simply moving the package directory into 
there and rerunning scanpkg. Reenable it by moving it back!

The script is basically a much smaller and simpler version of stow, 
which I've never really got on with. OTOH, scanpkg ends up on 
practically every machine I use. Enjoy.

-- 
[insert interesting .sig here]



More information about the Sclug mailing list