Re: How to make RPM installation fail if post script fails ?

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

 



On 10/2/06, Federico Lucifredi <flucifredi@xxxxxxx> wrote:
Not to sound unhelpful, but you should also consider whether you
*really* *really* need to do this. At Ximian, we have a rule that a post
script can *never* fail, and we arrange things accordingly.  Granted, it
is yet another constraint to live with, but so far it has served us
well.
Thats an interesting rule but its not based in the world within which I live.
Mind you I try to simplify my world and encourage others to do less
and less within scriptlets, but sometimes they need complicated things
done and I have to deal with the posibility of failure.

I think the bottom line is I work in a non-markeing speak/the real
deal "carrier grade" environment, and the basic rule is:

  If something fails rollback the system to the state it was in
before the upgrade.

So that is why I use rollbacks.

BTW, the article says that %post scriptlet failures are not handled by
autorollback but I long since fixed that.   It also, links to a
website I no longer have to get the patch, but the patch is no longer
needed as autorollback has long since been integrated into rpm.  I
really encourage people to use the latest versions of RPM if they want
to use autorollback (or just plain vanilla transactional rollbacks)
but I do believe the basic functionality is even in the core RHEL 4
stuff.  I have no idea what stream theyt are using for the future RHEL
5.

Cheers...james

best -f

On Mon, 2006-10-02 at 09:20 -0400, James Olin Oden wrote:
>         Hi all,
>
>
>
>         I don't know if this is possible, but my RPM consists of
>         several files that are installed (declared in %files of my
>         rpm.spec file), and also several steps to be done in post
>         section, after these files are copied to disk. It is necessary
>         for this rpm that it is not considered as installed if one of
>         the steps I'm doing in the post section of the spec file is
>         failing, so I've returned by exiting with non-zero value
>         (hoping this would stop the installation procedure), but this
>         does not help. Strangely enough, when un-installing (with rpm
>         –e command), if some error occurs in my preun script, then the
>         rpm is not uninstalled….
>
>
>
>         Is there some directive or special value to return for making
>         the installation fails after installing the rpm files ? Or am
>         I considering this the wrong way ?
>
>
>
> See my article:
>
>    http://www.linuxjournal.com/article/7034
>
> Your looking for the autorollback feature of rpm, or a flavor of it
> that does not exist which is a dead stop on failure.  Dead stop is
> easy but where I work  we never found dead stop to be nearly as
> usefull as try to automatically roll things back.
>
> Cheers...james
>
>
>
>
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/rpm-list
--

_________________________________________
-- "'Problem' is a bleak word for challenge" - Richard Fish
(Federico L. Lucifredi) - http://www.lucifredi.com



_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/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