[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: post post installation hook
- From: Jeff Johnson <n3npq jbj gmail com>
- To: RPM Package Manager <rpm-list redhat com>
- Subject: Re: post post installation hook
- Date: Fri, 8 Sep 2006 11:15:34 -0400
On Sep 8, 2006, at 7:41 AM, Lars Wilke wrote:
Hi,
i stumbled upon the following situation:
1. Installed package A
2. Update package A with a newer Version B
3. oops :)
The problem is the specfile of package A does not work correctly
on updates. It removes a user which is needed for running the daemon
provided by the package.
Presumably you mean that A has a buggy scriptlet, either %preun or %
postun.
There are disablers for the running of each type of scriptlet. I.e
adding --nopreun
will skip running %preun scriptlets, adding --nopostun will skip
running %postun.
But IIUC first the new package is installed and its pre/post
scripts are
triggered. Then the old package is removed, therefor running its
preun/postun scripts. But this scripts will not behave correctly :(
leaving the new package in a dysfunctional state.
Triggered? That means something very specific in an rpm context, and I'm
not sure that your packaging is using triggers. I'll assume that
there are no
triggers involved.
Yes, rpm installs B before erasing A on upgrades.
Fix the scripts is the best answer, but use the scriptlet disablers
to work around
whatever problems are already installed.
My question is now if there is some kind of final hook one can define
in the specfile of package B which is run as the last thing to correct
the broken deinstallation behaviour of package A?
Else if would have to write a shell wrapper which just does a simple
1. erase package A
2. install package B
This is possible, but imho feels quite kludgy.
Kludgy? Well, next time do the very modest QA to insure that A
scriptlets
are not buggy:
rpm -e A
hth
73 de Jeff
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]