On 10/2/06, John Runyan <johnrunyan1@xxxxxxxxx> wrote:
James, thank you for all the information. Is there a simple command to put in the %pre to stop RPM installation. Something like: if my pre-condition does not exist then ?????STOP???
No. Generally this will happen in some sort of wrapper that is running rpm. Where I work our upgrade script has application provided step that will check for application pre-conditions before rpm is called. This approach though has two problems: - Its not tied to packages. - Its specific to some proprietary environment (which is derived from the first problem). One can take an approach of having scripts of particular name that are litterally files in the package payload being extracted before running the package through rpm (using rpm2cpio) and then running these scripts as a "verify" operation, but again this is a proprietary approach. Note, there are pre-transaction scripts in rpm today, but the problem with these, is they do not have the published semantic of not changing the system (as a matter of fact, IIRC they were created to "do things" to the system before the transaction ran). So they really don't work well for what you want. It is possible for rpm to have added yet another scriptlet that had this pre-condition checking semantic, but I think the hard sell would be there is no way that I know to enforce the "don't change anything on the system" rule. So again, if you can take the "rpm wrapper" approach (which as I showed has various variations) that is what I would do. The wrapper approach though cannot be used if you are generally distributing your software. Cheers...james _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list