In SLES 12 Return codes of RPM scripts (%preinsatall,%postinstall....) are not reflected in job status. A failure in the script will not mark the SD job as failed

Document ID : KB000005008
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

Deploying a rpm package to SLES12 is marked as a success even if one of the scripts (%preinstall,%postintall....) has a non 0 return code

Environment:
SLES 12 and above
Cause:
  • SD Agent checks If the RPM package is successfully installed by using RPM -q <Package-Name> command . Based on the output it determines the package installation status. 
  • SUSE has shipped an updated RPM in SLES12.
  • This new RPM does not take the rc of the scripts into account when it determines rc for the rpm package.
  • SUSE has confirmed this is working as designed
Resolution:
  • There is no resolution to this within the current design
  • Client Automation relies upon the functionality of the OS for this and it has been changed by the OS vendor.