[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: dynamic dependency check



> What I meant in my question was is there a way for the RPM while installing
> to decide what OS its on and then check for a set of dependencies if one OS
> say FEDORA and another set of dependencies if another OS? e.g. Mandrake. I
> dont know before hand where my RPM would be installed.
>
>  Dhanvi

Ok well this is different. The answer really is, if you plan on distributing a 
binary rpm, then you should strive to make that rpm depend on as little as 
possible.  The more dependencies you have, the less portable the binary RPM 
becomes.

Your best answer may be to distribute a src.rpm file. But if you cannot do 
this, for whatever reason (i.e. you don't want to distrubute source code), 
then you may have to package prebuilt binaries that can be "adjusted" at 
installation time. As far as I know you cannot package different versions of 
a binary in the same rpm, except in the case that your spec file builds the 
package 3 times, moving the files each time to a different "sub-prefix" and 
then pacakging them all together. Then using some logic system in the %post 
section one could organize the files to install the right set into the 
prefix. The problem with this is that its not really package management 
anymore, just using the package management system as a delivery agent, which 
is not recommended. If you need to distribute binaries for only 3 different 
systems, then do one or a combination of the following three things: make the 
rpm as portable as possible (meaning minimal dependencies); package the 
dependencies along with the principle application; or use one spec file and 
build it individually on the 3 different target systems and provide 3 
different rpms.

I recommend the last option, and I highly recommend you provide the src.rpm 
instead with a complete set of BuildRequires:

-- 
Scot Mc Pherson <scot@linuxfromscratch.org>
http://linuxfromscratch.org/~scot/
Usenet Server Admin, IRCop, RPM Maintainer
ICQ: 342949
AIM: ScotLFS
MSN: behomet@earthlink.net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]