diff options
author | ewt <devnull@localhost> | 1998-04-05 17:22:28 +0000 |
---|---|---|
committer | ewt <devnull@localhost> | 1998-04-05 17:22:28 +0000 |
commit | 37e6bc17694031a1f7ff14db066921b65f35d4a3 (patch) | |
tree | 1b30345185691c998fd985dc1f5d54681bf7c803 | |
parent | a1aba0f11d6597e1715dc6584fd2d0d558976422 (diff) | |
download | librpm-tizen-37e6bc17694031a1f7ff14db066921b65f35d4a3.tar.gz librpm-tizen-37e6bc17694031a1f7ff14db066921b65f35d4a3.tar.bz2 librpm-tizen-37e6bc17694031a1f7ff14db066921b65f35d4a3.zip |
implemented %triggerpostun
CVS patchset: 2071
CVS date: 1998/04/05 17:22:28
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | docs/triggers | 11 | ||||
-rw-r--r-- | lib/uninstall.c | 5 |
3 files changed, 17 insertions, 0 deletions
@@ -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 diff --git a/docs/triggers b/docs/triggers index b7d5427b8..c148f1bca 100644 --- a/docs/triggers +++ b/docs/triggers @@ -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). diff --git a/lib/uninstall.c b/lib/uninstall.c index e56bcc62a..d6dc1bc03 100644 --- a/lib/uninstall.c +++ b/lib/uninstall.c @@ -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"); |