Quoting O Plameras <[EMAIL PROTECTED]>:

> So, what is the mechanism for it to know if there is or not.

RPM keeps a database that records what files are provided by each package. Along
with that information are details such as MD5s of the files, permissions,
modification dates etc.

If a package has a file dependency, RPM will not check whether or not the file
exists on the filesystem, it will check to see if it has been provided by a
package in its database. If the database says that it exists, it is assumed to
exist even if that is not actually the case (and if it is not the case,
something is wrong with your computer).

My recollection is that this was not always the case, but it has been at least
for the 4.x versions of RPM.

It is for this reason that building a library and installing it yourself will
not satisfy a library dependency for an RPM; even though if you forced the
installation you could coerce it to work. I got caught on this concept for quite
a while before I appreciated all the magical things that package management does
for me.

In short: file dependencies are evaluated exactly as per package dependencies.

> 
> And if there is,  how will the  program loader find where
> to load the libraries required ?

Ahh. That's a separate question.

Happily, there are some standards regarding the structure of RPMs that make
these kind of problems straightforward. There's a few directories where
(properly built) RPMs will install ".so"s and those directories are known about
by the loader. /usr/lib and /lib are amongst those directories. As part of the
post-installation scripts triggered by any properly built library RPM, ldconfig
will be executed to update ld.so.cache accordingly.

Hope that clears things up,

James.

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to