[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: rpm -U odd behavior
- From: marks <marks adax com>
- To: RPM Package Manager <rpm-list redhat com>
- Subject: Re: rpm -U odd behavior
- Date: Mon, 12 Feb 2007 13:44:45 -0800 (PST)
Hi,
Thanks Tim. I read Maximum RPM early on when I first started teaching
myself how to build RPMs. At the time, the upgrade scenario was low on my
list of priorities. :-) In addition, there seems to be scant information
stating that an upgrade would run the older package version's preun and
postun scripts after installing and running the new package version's pre
and post script. Perhaps I just didn't catch this bit of information.
I've been relying on the following (recommended from the list) in which I
have not found information documenting the specific behavior of an upgrade
(-U) in relation to the order of execution of pre/post/preun/postun
scripts or how to handle the situation.
http://fedora.redhat.com/docs/drafts/rpm-guide-en/index.html
However, there is mention of the parameter passed to the
pre/post/preun/postun scriptlets that indicates if a package is being
installed for the first time (1), is being upgraded (2 or higher) or if
the last version of the package is being removed (0). Just no real world
examples or warnings that a file managed by the pre/post/preun/postun
scripts that is not listed in the %files section could actually end
up deleted after being upgraded.
I've gone back and reviewed the Maximum RPM guide at
http://www.rpm.org/max-rpm/. I found the section that documents the
pre/post/preun/postun script parameter and why it exists and how it can be
used to solve my problem.
I still wonder why the implementation of an upgrade (-U) would run the
newer packages pre and post scripts and then run the older packages
preun/postun scripts. I suppose there could be a concern that if the
newer package fails to install correctly the upgrade process is halted and
since the older package was never removed the system has remained
unchanged.
I want to thank the authors of these very usefull documents. They are
very usefull. My appologies for the above ramblings. :-)
On Sat, 10 Feb 2007, Tim Mooney wrote:
> Date: Sat, 10 Feb 2007 23:13:27 -0600 (CST)
> From: Tim Mooney <mooney dogbert cc ndsu NoDak edu>
> Reply-To: RPM Package Manager <rpm-list redhat com>
> To: RPM Package Manager <rpm-list redhat com>
> Subject: Re: rpm -U odd behavior
>
> In regard to: rpm -U odd behavior, marks said (at 12:35pm on Feb 9, 2007):
>
> > During the upgrade process the echo commands revealed that the %pre and
> > %post scriptlets for version 1.45 ran first followed by the %preun and
> > %postun scriptlets for version 1.44! This, to me, is completely
> > backwards.
>
> Perhaps, but it's also completely documented behavior, and it has been
> this way for years.
>
> Search the net for "Maximum RPM", which is an outdated guide to RPM that
> still has lots of relevant bits. The bit on how to detect and handle
> upgrades in your %post and %postun scripts is in there.
>
> I know it can be tough to get started with RPM, but reading that document
> and asking questions here will help.
>
> Tim
>
--
Thanks,
Mark Sincerbox
Adax, Inc.
1-510-548-7047 x129
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]