Don't run collections on script stages like %pre/posttrans, ugh.
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 25 May 2011 11:03:57 +0000 (14:03 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 25 May 2011 11:04:18 +0000 (14:04 +0300)
lib/rpmte.c

index dfd7b6f..d13575a 100644 (file)
@@ -904,15 +904,19 @@ int rpmteProcess(rpmte te, pkgGoal goal)
        }
     }
 
-    rpmteRunAllCollections(te, PLUGINHOOK_COLL_PRE_REMOVE);
+    if (!scriptstage) {
+       rpmteRunAllCollections(te, PLUGINHOOK_COLL_PRE_REMOVE);
+    }
 
     if (rpmteOpen(te, reset_fi)) {
        failed = rpmpsmRun(te->ts, te, goal);
        rpmteClose(te, reset_fi);
     }
     
-    rpmteRunAllCollections(te, PLUGINHOOK_COLL_POST_ADD);
-    rpmteRunAllCollections(te, PLUGINHOOK_COLL_POST_ANY);
+    if (!scriptstage) {
+       rpmteRunAllCollections(te, PLUGINHOOK_COLL_POST_ADD);
+       rpmteRunAllCollections(te, PLUGINHOOK_COLL_POST_ANY);
+    }
 
     /* XXX should %pretrans failure fail the package install? */
     if (failed && !scriptstage) {