RE: post post installation hook

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

 



In regard to: RE: post post installation hook, James Welch (jimwelc) said...:

I feel your pain...and would recommend looking into using trigger's.
Triggers provide a well-defined method for packages to interact with one
another at package install and uninstall time.  They are an extension of
the normal installation scripts (i.e. %pre,%post...etc) which allows one
package to execute an action when the installation status of another
package changes.

Here is a starting point:

http://www.rpm.org/support/RPM-Changes-6.html

Triggers can be extremely useful and can indeed be used to undo things
that some other package has just done, but that should be a last resort
and should be used sparingly.

The best thing is just to fix the broken %preun or %postun.  If Lars has
control of the spec file, fixing the script is easy and what needs to
be done is documented in Maximum RPM and is still valid today.

If Lars doesn't have control of the spec file, it's possible that a vendor
is involved, in which case there may be an opportunity to report the bug
(and it is a bug) to the vendor.

Tim

-----Original Message-----
From: rpm-list-bounces@xxxxxxxxxx [mailto:rpm-list-bounces@xxxxxxxxxx]
On Behalf Of Lars Wilke
Sent: Friday, September 08, 2006 7:42 AM
To: Rpm-list@xxxxxxxxxx
Subject: post post installation hook

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.

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.

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.

thanks

  --lars


_______________________________________________
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


--
Tim Mooney                              mooney@xxxxxxxxxxxxxxxxxxxxxxxxx
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

_______________________________________________
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