Search code examples
redhatrpmrpm-spec

How do I enforce RPM requires order


I have spent all day trying various things and made no progress whatsoever.

I am compiling an rpm package for my application (MyApp.rpm), for RHEL6 64-bit, which requires a third party, 32-bit driver package called aksusbd.rpm. Now, aksusbd.rpm in turn requires compatibility mode, provided on RHEL6 by glibc.i686.rpm.

So somewhere in my spec file for MyApp.rpm I have:

MyApp.spec

Requires: glibc(x86-32) 
Requires: aksusbd >= 1.14

What it does during installation (yum install MyApp) is, installs aksusbd first, which fails with no 32-bit compatibility installed. Then just to tease me, immediately after installs glibc. So when its all over I can type

yum install aksusbd 

and it works this time because glibc is now installed.

How on earth do I teach it to do better than this!

(growl)


Solution

  • You can follow Aaron's suggestion and tweak the third party RPM you have with rpmrebuild. It allows you to modify the requires spec of the RPM package:

    rpmrebuild --package -n --edit-requires <your third party rpm package>
    

    It's a hack but just for the requires tags in the RPM I would not be concerned.