I'm trying to build an RPM that will install file dependencies if they don't exist. Is there an RPM Spec Section that will be executed before the RPM checks for dependencies. (I'm refering to file dependencies not package dependencies listed in the "Requires" header).
Example: If I have a perl file and the execution permissions bit is set. RPM will check to see if perl is installed in the location the "#!/bin/perl" specifies in the perl file. (It looks like it checks the RPM database to see if perl is installed in that location instead of checking the actual file location) If perl is not installed in the /bin/perl location I want to install it before the RPM will error out telling me "/bin/perl is needed by [MY_PACKAGE]"
Side Question: Since the file dependency checks the RPM database is there a way to update the installed locations? i.e. If my perl script specifies "#!/usr/local/bin/perl" but my RPM database has perl located in "/usr/bin/perl" how do I update the RPM datbase? Symbolically linking "/usr/local/bin/perl" manually won't work becuase it doesn't updated the RPM database. The RPM installer will still say "/usr/local/bin/perl is needed by [MY_PACKAGE]"