Re: Processing of post and postun Tags
Jeff Pitman <[email protected]> Sat, 25 Sep 2004 18:06:47 +0800
| Newsgroups | gmane.linux.conectiva.apt-rpm |
|---|---|
| Message-ID | <[email protected]> |
On Saturday 25 September 2004 18:59, Christian Metzen wrote:
> Anyone already experienced that too? Or does anyone know a solution
> for this? For some packages this makes things for the users really
> nasty...
If you're building your own packages, then there is something you can
do. Otherwise, there's not much you can do. I ran into this while
trying to setup alternatives for different python versions using the
Redhat-supplied alternatives system found in chkconfig. I found that
the order in which things were installed caused it so that the ``best"
alternative was not selected after install. So, to get around this I
had to create a trigger:
%triggerpostun -- python, python23
%{_bindir}/alternatives --auto python
exit 0
The files were already in place to go, but because %preun executes
"alternatives --remove", things would go haywire.
You can check out the order of script execution by looking at
"/usr/share/doc/rpm-4.y.z/triggers" (where y.z are the version numbers
for your rpm install.)
I was taught by the great jbj that things are installed first and then
removed to cover the case when major libraries are being upgraded. Like
libc. And, as you may know, if libc is sidelined, the whole system can
go south.
(As a side note, I bailed on Redhat's alternatives and went with
ALTLinux's alternatives.sf.net, which is much more flexible.)
take care,
--
-jeff