Quote:
Originally posted by redhatrosh
But there is one thing. A mechanism should be adopted such that library files will be embedded in an rpm and checked on installation of the whether the required library file is present or not and put the library file in its place in case it is missing.
|
If only it were that easy! Many providers can produce different but compatible versions of the same library file, each of which would need to be embedded into the RPM, and you'd need a way of asking the user which version they would want.
Given that some commercial companies provide libraries (e.g. Intel provides a version of the C library), which can't be distributed seperately without paying for a licence fee each time, this would mean that the cost of each RPM file would be several thousand dollars, even for a single package, just for common libraries like libc. Not to mention that the file size would be hundreds of megabytes even for relatively simple programs, most of which would never be used.
Instead, packages have dependencies — almost every package requires /usr/lib/libc.so.6, but doesn't specify which package should provide it. GNU, Intel and various others can all provide their own RPM packages providing different versions of the libc.so.6 file, and RPM will be happy if any of these are installed, or will otherwise tell the package manager which to install. If you use RPM by hand, then you are the package manager and need to find out where to install it.
RPM is a very low-level tool for testing package dependencies, but it doesn't know how to fix them. Full-blown package managers like yum, yast, apt-get and so on all know about various RPM repositories from which they can download and/or install packages containing the required library files. But RPM can't know about this; each distribution implements its repositories differently and RPM is a general-purpose tool.