use of /usr/local by packages

ZIYAD A. M. AL-BATLY zamb at saudi.net.sa
Wed Aug 24 15:14:24 UTC 2005


On Wed, 2005-08-24 at 09:55 -0400, Alvin Thompson wrote:
> i've noticed that several packages in the distribution place things 
> under /usr/local. i'm sure there are more, but these are a few i've run 
> across:
> 
> eclipse (plugins)
> python 2.4 (site packages)
> whatever handles firmware
> the font system (caches)
> 
> i always thought it was a major _faux pas_ for a distribution to place 
> things under /usr/local, especially stuff of this type, which can be 
> changed during normal operation. /usr and /usr/local are not guaranteed 
> to be mounted as writable except when the admin is installing something, 
> right?
> 
> all of this stuff (which is potentially modified during normal 
> operation) belongs under /var or /var/lib, i think. this is exactly what 
> /var is for. in any case, it doesn't belong under /usr/local.
> 
> -alvin
> 
I didn't get your point exactly, but here's what I know/think:  It's
normal for some packages to place things in "/usr/local".  Moreover,
sometimes it's necessary to do so.  An example, you mentioned the Python
package.  It creates an *empty* directory in
"/usr/local/lib/python2.4/site-packages".  That's important so that the
user/administrator of the system can place his/her Python modules which
are not maintained by "dpkg" in there and be accessible from within
Python.  Likewise with other things.

The Package creates the empty directory to tell the user something:
        This directory is here so that you can use it, and it is
        inspected/monitored by me.  I do care what's inside it (if
        anything found there).

(If you still didn't understand what I want to say, think what happens
if you want to install some Python module that's only available in
source format and not in "*.deb" package, and you can't (or don't want
to) build your own *.deb package.  What's the solution?  Simply, copy
that module's file(s) to "/usr/local/lib/python2.4/site-packages" and
that's it!)

I hope this correct and I hope it clears things for you.
Ziyad.





More information about the ubuntu-users mailing list