implemented %triggerpostun
authorewt <devnull@localhost>
Sun, 5 Apr 1998 17:22:28 +0000 (17:22 +0000)
committerewt <devnull@localhost>
Sun, 5 Apr 1998 17:22:28 +0000 (17:22 +0000)
CVS patchset: 2071
CVS date: 1998/04/05 17:22:28

CHANGES
docs/triggers
lib/uninstall.c

diff --git a/CHANGES b/CHANGES
index 22aaf5f..0512956 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
        - --nomd5 wasn't handled properly
        - updated configure.in find-req and find-prov checks (Tim Mooney)
         - make --rmsource actually work
+       - run postun triggers
 
 2.4.105 -> 2.4.106:
        - build: only check for non-printables in first 128 chars
index b7d5427..c148f1b 100644 (file)
@@ -111,3 +111,14 @@ conditions becomes true (the , can be read as "or"). For example:
 Will put a trigger in package 'package' which runs when the installation
 status of either fileutils > 3.0 or perl < 1.2 is changed. The script will
 be run through /usr/bin/perl rather then /bin/sh (which is the default).
+
+An Unusual Case
+---------------
+
+There is one other type of trigger available -- %triggerpostun. These are
+triggers that are run after their target package has been removed; they will
+never be run when the package containing the trigger is removed. 
+
+While this type of trigger is almost never usefull, they allow a package to
+fix errors introduced by the %postun of another package (or by an earlier 
+version of that package).
index e56bcc6..d6dc1bc 100644 (file)
@@ -340,6 +340,11 @@ int rpmRemovePackage(char * prefix, rpmdb db, unsigned int offset, int flags) {
                      flags & RPMUNINSTALL_NOSCRIPTS, 0);
     }
 
+    /* Run postun triggers which are set off by this package's removal */
+    if (runTriggers(rootdir, db, RPMSENSE_TRIGGERPOSTUN, h, 0)) {
+       return 2;
+    }
+
     headerFree(h);
 
     rpmMessage(RPMMESS_DEBUG, "removing database entry\n");