As far I've seen, see bugs 533831 and 465409, starting with version 4.6 rpm exits 0 even if the scriptlets (all but %pre and %preun) exit with error.
IMHO this breaks legacy rpm behaviour (i.e. pre version 4.6) and leads to misunderstandings since a simple test on the rpm exit code is not reliable anymore. In other words the rpm exit status tells that the software itself has been replaced (updated) by a newer version but you know nothing about all the others steps involed with a change management process (rebuilding of library cache, configuration migration, service restart an so on).
Is there a way tho revert to the old behaviour or to have them toghether?
How reproducible:
Always, just place exit 1 in you rpm %post scriptlet.
As far I've seen, see bugs 533831 and 465409, starting with version 4.6 rpm exits 0 even if the scriptlets (all but %pre and %preun) exit with error.
IMHO this breaks legacy rpm behaviour (i.e. pre version 4.6) and leads to misunderstandings since a simple test on the rpm exit code is not reliable anymore. In other words the rpm exit status tells that the software itself has been replaced (updated) by a newer version but you know nothing about all the others steps involed with a change management process (rebuilding of library cache, configuration migration, service restart an so on).
Is there a way tho revert to the old behaviour or to have them toghether?
How reproducible:
Always, just place exit 1 in you rpm %post scriptlet.