[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: How to make RPM installation fail if post script fails ?
- From: John Runyan <johnrunyan1 yahoo com>
- To: rpm-list redhat com
- Subject: Re: How to make RPM installation fail if post script fails ?
- Date: Mon, 2 Oct 2006 10:29:37 -0700 (PDT)
In my case, the %pre only does a pre-condition check.
Nothing else. A single RPM is being installed. Do I
still need the rollback procedure?
--- James Olin Oden <james oden gmail com> wrote:
> On 10/2/06, John Runyan <johnrunyan1 yahoo com>
> wrote:
> > How do you stop RPM installation in the %pre
> section?
> > It shouldn't require the rollback procedure you
> sent a
> > link to, James, should it?
> It absolutely does require that. The reason is
> multi-faceted:
>
> - Pre-scripts can do things. They do not have
> the same semanic as a solaris
> verify script which is only used to check for
> pre-conditions.
> - Pre-scripts are not all ran at the begining of
> the transaction,
> but as each installed
> package goes through the package state machine
> (PSM) its
> pre-scriplet is ran such
> that the system has necessarily been changes by
> the packages than
> ran before it
> in the transaction.
> - scriptlets are opaque to RPM, so there is no
> way to tell if a
> script has changed the
> system or not.
>
> When you stack these up you get that at the time of
> a %pre scriptlet
> failure the system could have been changed,
> therefore the transaction
> should be rolled back to bring the system back to
> the original state.
> Note, the therefore is based my environments rule of
> rolling back
> failed transactions. One could have alternate
> policies.
>
> Also, another thing to consider that my article does
> not discuss, is
> that sometimes an "upgrade" of a system requires
> multiple transactions
> (at least if you are using the rpm cli). For
> instance, you might
> have one transaction with kernels and kernel modules
> that were
> installed, and then another with other packages that
> were upgraded.
> By the rules in my enviorment if a %pre failed in
> the second
> transaction, then you would want to roll back that
> transaction and the
> previous one. That is what the --arbgoal switch is
> about (which is
> not documented), which allow you to specify a roll
> back goal to use in
> the event of a failure.
>
> Cheers...james
>
> _______________________________________________
> Rpm-list mailing list
> Rpm-list redhat com
> https://www.redhat.com/mailman/listinfo/rpm-list
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]