Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 May 1999 04:46:48 +0100
From:      paul@originative.co.uk
To:        freebsd-ports@freebsd.org
Subject:   Mozilla LDAP sdk and file reference counts
Message-ID:  <A6D02246E1ABD2119F5200C0F0303D10FF62@octopus>

next in thread | raw e-mail | index | archive | help
Has this made it to the list before? I never saw it hit the list so I'm
resending it.

------
I'm working on port of the Mozilla LDAP sdk and the installation step
has raised a few issues.

The Mozilla directory structure is a little bit involved. The root of
the tree is ./mozilla and then under that sit a number of the components
that make up the Mozilla product, such as the browser, the portability
code (nsprpub) and the ldap code (in ./mozilla/directory).

The build mechanism creates OS specific object directories local to the
actual sources, for instance

mozilla/directory/c-sdk/ldap/libraries/libldap/FreeBSD4.0_DBG.OBJ

in the case of libldap, where the source files are held in the libldap
directory. When you run the install step it uses the mozilla specific
nsinstall program which creates a link farm rooted at
./mozilla/dist/FreeBSD4.0_DBG.OBJ where the links point into the object
directories in the src tree.

The directory layout under /mozilla/dist/FreeBSD4.0_DBG.OBJ can't really
be changed since other software (such as the perldap) expect to be
passed the root directory and find all the required bits (include files,
libraries etc) in the right places underneath.

So, probably the only way to install this is to put it somewhere like
/usr/local/mozilla.

I took a look at the mozilla browser port and that puts the common
binaries in /usr/local/lib/mozilla/bin and the actual browser binary in
/usr/local/bin. This makes sense but it's going to become a mess if we
start to add other components of the mozilla project as ports.

This leads to the real problem, reference counting of installed files.

If we agree to put the mozilla installed files under /usr/local/mozilla
(for instance) then each port will need to install its own copies of the
shared components, i.e. nsinstall etc. When you install a second
component it will also need to install those same components into the
same place. That's OK, but when you uninstall one of these sub-ports how
does it know whether to remove the binary that's shared. If it removes
it then the other sub-port stops working. If nothing ever removes it
then the uninstall mechanism will leave cruft around. My current
solutions is to treat the ldap port as totally distinct from the mozilla
port but that's not a good solution.

We need a more complex installation tool that records what files are
installed by the ports mechanism and which port did the installing. When
a port tries to uninstall a file the ports mechanism should be able to
remove it as *one* of the owners of that file and not actually remove
the file until the last owner tries to remove it.

If you've used installation tools under Windows you'll have seen this
crop up a lot :-)

The reference counting problem is something that needs thinking about
and eventually solving but in the meantime I'd like to commit my port
asap so what's the current thinking on where to install the mozilla
components to?

Paul Richards.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A6D02246E1ABD2119F5200C0F0303D10FF62>