Disable all scriptlets and collections centrally on --test and --justdb
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 25 May 2011 11:52:39 +0000 (14:52 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 25 May 2011 11:52:39 +0000 (14:52 +0300)
- These are already taken care of in other places but they're littered
  a little bit of here and there, eg in case of collections these
  modes are only skipped deep down in the plugin code. This should
  make the intended behavior more obvious upfront.

lib/transaction.c

index 84cc8e3..6797430 100644 (file)
@@ -1244,8 +1244,8 @@ static int rpmtsSetup(rpmts ts, rpmprobFilterFlags ignoreSet)
     if (rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERS)
        (void) rpmtsSetFlags(ts, (rpmtsFlags(ts) | _noTransTriggers));
 
-    if (rpmtsFlags(ts) & RPMTRANS_FLAG_JUSTDB)
-       (void) rpmtsSetFlags(ts, (rpmtsFlags(ts) | _noTransScripts | _noTransTriggers));
+    if (rpmtsFlags(ts) & (RPMTRANS_FLAG_JUSTDB | RPMTRANS_FLAG_TEST))
+       (void) rpmtsSetFlags(ts, (rpmtsFlags(ts) | _noTransScripts | _noTransTriggers | RPMTRANS_FLAG_NOCOLLECTIONS));
 
     /* if SELinux isn't enabled, init fails or test run, don't bother... */
     if (!is_selinux_enabled() || (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST)) {