Ali
Ali

Reputation: 1500

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)

Upvotes: 3

Views: 2600

Answers (4)

Bernhard
Bernhard

Reputation: 8831

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.

Upvotes: 2

Eran Ben-Natan
Eran Ben-Natan

Reputation: 2615

I had exactly the same problem (and same in YUM groups). If Forrest suggestion to put requires in same line works for you, please let us know. Otherwise, you can try to add an RPM that only requires aksusbd and add it to requires list. If YUM installs dependencies in an Alpha-beta order, name it something between aksusbd and glibc and it might work.

Upvotes: 0

Aaron D. Marasco
Aaron D. Marasco

Reputation: 6748

Sounds like the aksusbd RPM is what needs to be fixed - they need a Requires or Requires(pre) set. File a bug with the driver vendor.

Upvotes: 0

Forrest
Forrest

Reputation: 1440

First off I'd suggest putting the requires on the same line. Just separate them with a comma, they should then go in the order you've specified. If it doesn't and you're on RPM version 4.3 or below, you can use the PreReq tag as specified in the rpm.org docs about half way down the page.

If neither of those solutions works, or you are on a version of RPM greater than or equal to 4.4 I would imagine something else is going on that is causing a problem. I'd start by creating a new spec for some 'fake' project that specifically targets the issue of glibc not being installed before aksusbd. If that works we know it's something with your MyApp.spec, if it doesn't work then I'd suggest reviewing the naming convention of glibc, perhaps there is some kind of issue with how it's interpreting your (x86-32).

Upvotes: 0

Related Questions