diff -uNr rpm-3.0.4-orig/lib/depends.c rpm-3.0.4/lib/depends.c
--- rpm-3.0.4-orig/lib/depends.c	Wed Dec 15 15:51:30 1999
+++ rpm-3.0.4/lib/depends.c	Thu Apr 20 11:55:56 2000
@@ -262,6 +262,8 @@
     p->key = key;
     p->fd = (fd ? fdLink(fd, "alAddPackage") : NULL);
 
+    p->installFlags = 0;
+    
     if (relocs) {
 	for (i = 0, r = relocs; r->oldPath || r->newPath; i++, r++);
 	p->relocs = xmalloc(sizeof(*p->relocs) * (i + 1));
@@ -734,6 +736,18 @@
     free(rpmdep);
 }
 
+void rpmtransSetFlags(rpmTransactionSet rpmdep, Header h, int flags) {
+    struct availablePackage * p;
+    int i;
+                  
+    p = rpmdep->addedPackages.list;
+    for (i = 0; i < rpmdep->addedPackages.size; i++, p++) {
+       if (p->h == h) {
+            p->installFlags = flags;
+        }
+    }
+}
+ 
 void rpmdepFreeConflicts(struct rpmDependencyConflict * conflicts,
 			int numConflicts)
 {
diff -uNr rpm-3.0.4-orig/lib/depends.h rpm-3.0.4/lib/depends.h
--- rpm-3.0.4-orig/lib/depends.h	Wed Dec 15 15:51:30 1999
+++ rpm-3.0.4/lib/depends.h	Thu Apr 20 11:57:43 2000
@@ -17,6 +17,7 @@
     /*@dependent@*/ const void * key;
     rpmRelocation * relocs;
     /*@null@*/ FD_t fd;
+    int installFlags;
 } ;
 
 enum indexEntryType { IET_NAME, IET_PROVIDES };
diff -uNr rpm-3.0.4-orig/lib/install.c rpm-3.0.4/lib/install.c
--- rpm-3.0.4-orig/lib/install.c	Wed Feb 16 16:14:41 2000
+++ rpm-3.0.4/lib/install.c	Thu Apr 20 11:59:14 2000
@@ -927,6 +927,10 @@
     rc = 0;
 
 exit:
+    if (notify) {
+       notify(h, RPMCALLBACK_INST_STOP, 0, 0, pkgKey, notifyData);
+    }
+
     if (rootdir && currDir) {
 	/*@-unrecog@*/ chroot("."); /*@=unrecog@*/
 	chdir(currDir);
diff -uNr rpm-3.0.4-orig/lib/rpmlib.h rpm-3.0.4/lib/rpmlib.h
--- rpm-3.0.4-orig/lib/rpmlib.h	Wed Feb 23 21:52:42 2000
+++ rpm-3.0.4/lib/rpmlib.h	Thu Apr 20 12:00:47 2000
@@ -306,7 +306,7 @@
 typedef /*@abstract@*/ struct rpmdb_s * rpmdb;
 
 typedef enum rpmCallbackType_e {
-    RPMCALLBACK_INST_PROGRESS, RPMCALLBACK_INST_START,
+    RPMCALLBACK_INST_PROGRESS, RPMCALLBACK_INST_START, RPMCALLBACK_INST_STOP,
     RPMCALLBACK_INST_OPEN_FILE, RPMCALLBACK_INST_CLOSE_FILE,
     RPMCALLBACK_TRANS_PROGRESS, RPMCALLBACK_TRANS_START, RPMCALLBACK_TRANS_STOP,
     RPMCALLBACK_UNINST_PROGRESS, RPMCALLBACK_UNINST_START, RPMCALLBACK_UNINST_STOP
@@ -406,6 +406,7 @@
 void rpmtransRemovePackage(rpmTransactionSet rpmdep, int dboffset);
 void rpmtransFree( /*@only@*/ rpmTransactionSet rpmdep);
 void rpmtransSetScriptFd(rpmTransactionSet ts, FD_t fd);
+void rpmtransSetFlags(rpmTransactionSet ts, Header h, int flags);
 
 /* this checks for dependency satisfaction, but *not* ordering */
 int rpmdepCheck(rpmTransactionSet rpmdep,
diff -uNr rpm-3.0.4-orig/lib/transaction.c rpm-3.0.4/lib/transaction.c
--- rpm-3.0.4-orig/lib/transaction.c	Tue Feb 22 12:02:54 2000
+++ rpm-3.0.4/lib/transaction.c	Thu Apr 20 12:02:33 2000
@@ -1644,7 +1644,8 @@
 
 	    if (fd) {
 		if (installBinaryPackage(ts->root, ts->db, fd,
-					 hdrs[i], transFlags, notify,
+					 hdrs[i], transFlags | alp->installFlags,
+					 notify,
 					 notifyData, alp->key, fi->actions,
 					 fi->fc ? fi->replaced : NULL,
 					 ts->scriptFd)) {
