raminsrad at gmail.com
Thu Jul 14 14:17:09 UTC 2011
The dependencies in RPM are only meaningful when it comes to packages
(and virtual resources) that are in the RPM DB.
If you say "Requires: libQtCore.so.4", RPM thinks there is another RPM
package called libQtCore.so.4 that has to be installed prior to this and
it checks its database and it doesn't find it, hence the error.
What you really want is file dependency. I am not sure if RPM supports
that, but you can simply put something like this in your "%pre" section:
if [ ! -e /usr/lib/libQtCore.so.4 ]
echo "ERROR: /usr/lib/libQtCore.so.4 doesn't exist! Bailing out."
# end of %pre
You can write as much script as you want in the %pre section and do all
sorts of thing before your package is actually installed.
I hope this helps,
On 7/14/2011 10:02 AM, kali c wrote:
> I have my application which I want to build a rpm package. The
> application has some dependencies that has to be installed. It
> requires few .so files that has to be present in the application
> running machine. Say for e.g libQtCore.so.4. The command ldd reveals
> other dependencies as well. I tried giving those dependencies in the
> SPEC file under the requires field as Requires: libQtCore.so.4 ....
> I have also added the liQtCore.so.4 in the %files section with the
> absolute path. I can build the SPEC file to .rpm without any errors.
> But I am getting errors regarding those dependencies while installing
> Specifically error: Failed dependencies:
> libQtCore.so.4 is needed by myApplication-1.0-1.x86_64
> How I can specify in my SPEC file such that I can install those
> dependencies even if they are not present in the target system? I need
> this because not all the dependencies will be available in the target
> system so that I can specify in some way so that either the entire
> packages get installed or the required .so files are referred by the
> application appropriately while installing my application.
> I am quite new to RPM so sorry if the question is a very basic one.
> Rpm-list mailing list
> Rpm-list at lists.rpm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rpm-list