Skip posttrans scripts of failed transaction elements
authorPanu Matilainen <pmatilai@redhat.com>
Sat, 17 Oct 2009 08:25:53 +0000 (11:25 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Sat, 17 Oct 2009 08:25:53 +0000 (11:25 +0300)
lib/transaction.c

index d21133e..50334dd 100644 (file)
@@ -911,8 +911,8 @@ static int runTransScripts(rpmts ts, rpmTag stag)
 
     pi = rpmtsiInit(ts);
     while ((p = rpmtsiNext(pi, TR_ADDED)) != NULL) {
-       /* If no pre/post-transaction script, then don't bother. */
-       if (!rpmteHaveTransScript(p, stag))
+       /* Skip failed elements & those without pre/posttrans */
+       if (!rpmteHaveTransScript(p, stag) || rpmteFailed(p))
            continue;
 
        if (rpmteOpen(p, ts, 0)) {