[CentOS-devel] [EXTERNAL] Re: Rpm post scriplet failed with exit status 1 but return status of rpm is 0

Yedidyah Bar David

didi at redhat.com
Mon Jul 15 08:24:38 UTC 2019


On Wed, Jul 10, 2019 at 4:20 PM Brian Reichert <reichert at numachi.com> wrote:
>
> On Wed, Jul 10, 2019 at 09:49:50AM +0000, Maheshwari, Shagun wrote:
> > Hi Trevor,
> >
> > Thank you!! for your response.
> >
> > I will raise this issue on Bugzilla but I want to know why RPM is allow to install in your system when scriptlet failing error is coming?
> > Is this a right behavior?
>
> In my experience, a failure in %post doesn't prevent the RPM from
> being installed, as that scriptlet is fired after the installation
> completes.
>
> Similarly, if there's an error in %postun, the RPM's payload is
> removed, but the RPM is seen as still installed by the RPM database.

Exactly.

Also managed to find:

https://access.redhat.com/errata/RHBA-2013:1665

which says:

With this update, Red Hat Enterprise Linux 5 backwards-compatibility option,
"%_strict_script_errors macro", has been added. The default behavior of Red Hat
Enterprise Linux 6 does not change with this update and users that do not demand
this option specifically are not advised to use it. (BZ#963724)

And also:

https://github.com/rpm-software-management/rpm/commit/5455f02523a9b8583d5a942a6d97f1084f3093df

which I guess will not be backported to EL7, but perhaps is already
part of EL8 (didn't check).

As a side note, which is also one reason why I am interested in this,
in otopi (oVirt's setup-programs framework) we decided to fail on any
error, see also if interested:

https://bugzilla.redhat.com/show_bug.cgi?id=1493160

https://bugzilla.redhat.com/show_bug.cgi?id=1528290

Best regards,
-- 
Didi



More information about the CentOS-devel mailing list