Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
Why is it necessary to use the force flag? –  bbaja42 Jun 19 '11 at 12:56
    
It's actually used in a script. It's used so that the RPM gets installed even if it's reported to be already installed. –  BlueSilver Jun 19 '11 at 19:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.