I'm working on an embedded system and have created a bunch of RPMs. The following problem is present in some of the RPMs.
When I install/upgrade version 2 of the RPM on top of version 1 or install version 1 of the RPM on top of version 2, The installation gives an exit code of 0.
However when I install the exact same version of the RPM on top of an existing installation, it returns an exit code of 1. However most of the other RPMs don't have this behaviour (Exit code of 1 when installing RPM on top of an existing installation)
Is this by design? There is a custom script which detected unsuccessful installations based on the exit code, so I need this RPM installation to return 0. I'm using the following command.
rpm -Uv --force <rpm-file>
I tried generating more verbose logs, but there is absolutely no difference between scenarios where it returns 0 and scenarios returning 1.