RE: Can I make an rpm abort installation in a %post script?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dylan,

 

When %post is running, the package is already installed, so all files are in place. Exiting with fatal error won't help here.

I don't think you can run rpm -e within the %post, because RPM won't allow this.

I believe your only way is to fire a trigger to uninstall the package later (with at command, for example)

 

If you want to uninstall the package so that packages depends on it will not be installed when using YUM, then you can't, because YUM install all RPMs as a single transaction. In this case you must check in the %pre of the depends package that the %post of the previous package completed successfully.

 

From: Rpm-list [mailto:rpm-list-bounces@xxxxxxxxxxxxx] On Behalf Of Dylan Martin
Sent: Wednesday, October 01, 2014 9:06 PM
To: rpm-list@xxxxxxxxxxxxx
Subject: Can I make an rpm abort installation in a %post script?

 

Hi all.

 

I basically want to add a regression test to my spec file's %post script and have the rpm uninstall itself if the %post script fails.

 

If my %post script exits non-zero, I get a non-fatal POST error.

 

Is there a way to make %post give a fatal error?  

 

Thanks!

 

-Dylan

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux