tags:

views:

72

answers:

1

Hi everyone!

We are developing an application in python, and we are using RPM to install it. But sometimes, an error can happen during installation, and I can detect it. The question is, is there any way to cancel an installation if something is wrong? I tried to execute a "rpm -e package_name" command, but it's imposible because the system doesn't allow to run two RPM in parallel, so RPM is waiting my code to finish, and my code is waiting to first RPM to launch its own "rpm -e"

Thanks a lot in advance!!

A: 

Do not attempt to abort installation of a rpm package. Either fail to start installing, or notify the user of the error when they attempt to run the software.

Ignacio Vazquez-Abrams
I can't do anything of that:First, I don't know if I have to cancel install until something wrong happens, so I can't fail to start installing (I understand that what you say is to check if something will go wrong BEFORE start installing)Second, I can't notify user because there is no user, I mean, is everything done by code, so my application checks if there is a previous installation, if so updates it and if not installs it, and if there's a problem cancels the install/update
Esabe