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 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!

I don't believe there is. %post is not necessarily run directly after your
package installs in cases where numerous packages are installed at once.

So if package A uninstalls in %post because of a failure, package B
requires package A, but package A's post script isn't executed until after
B is installed - that could be problematic.

Better to use Requires to make sure your RPM has everything it needs to
not fail its %post scriptlet.
Rpm-list mailing 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