Trying to install a freshly built RPM but it says it is dependent on a lib it should not be dependent on

LouisC asked:

The package in question is samba-3.6.7. I’ve built the package successfully, but when trying to install it, it returns,

error: failed dependencies: is needed by samba-3.6.7

I have no clue why this happens. is provided by my current samba package (which I am replacing), but this new samba provides and Why is it still dependent on and how can I fix it?

My answer:

Build your RPMs using mock. This builds within a chroot containing only the necessary packages for building the RPM and helps to prevent situations like this.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.