Rip the broken asynchronous psm machinery
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 10 Sep 2009 12:03:13 +0000 (15:03 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 10 Sep 2009 12:03:13 +0000 (15:03 +0300)
- it was only "used" for the ldconfig optimization and actually been
  completely broken since the ordering rewrite

lib/psm.c
lib/psm.h
lib/rpmts.c
lib/rpmts.h
lib/rpmts_internal.h
lib/transaction.c

index 8c3b9f2..48b4d34 100644 (file)
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -49,7 +49,6 @@ struct rpmpsm_s {
     rpmsenseFlags sense;       /*!< One of RPMSENSE_TRIGGER{PREIN,IN,UN,POSTUN}. */
     int countCorrection;       /*!< 0 if installing, -1 if removing. */
     int chrootDone;            /*!< Was chroot(2) done by pkgStage? */
-    int unorderedSuccessor;    /*!< Can the PSM be run asynchronously? */
     rpmCallbackType what;      /*!< Callback type. */
     rpm_loff_t amount;         /*!< Callback amount. */
     rpm_loff_t total;          /*!< Callback total. */
@@ -664,14 +663,12 @@ static rpmRC runScript(rpmpsm psm, Header h, rpmTag stag, ARGV_t * argvp,
 
     psm->sq.reaper = 1;
 
-    rpmlog(RPMLOG_DEBUG, "%s: %s %ssynchronous scriptlet start\n",
-          psm->stepName, sname, (psm->unorderedSuccessor ? "a" : ""));
+    rpmlog(RPMLOG_DEBUG, "%s: %s scriptlet start\n", psm->stepName, sname);
 
     if (argvCount(*argvp) == 0) {
        argvAdd(argvp, "/bin/sh");
     }
 
-
     /* Try new style prefixes first, then old. Otherwise there are none.. */
     if (!headerGet(h, RPMTAG_INSTPREFIXES, &prefixes, HEADERGET_DEFAULT)) {
        headerGet(h, RPMTAG_INSTALLPREFIX, &prefixes, HEADERGET_DEFAULT);
@@ -1094,12 +1091,6 @@ rpmpsm rpmpsmFree(rpmpsm psm)
     return NULL;
 }
 
-void rpmpsmSetAsync(rpmpsm psm, int async)
-{
-    assert(psm != NULL);
-    psm->unorderedSuccessor = async;
-}
-
 rpmRC rpmpsmScriptStage(rpmpsm psm, rpmTag scriptTag, rpmTag progTag)
 {
     assert(psm != NULL);
index 123375d..7d2a309 100644 (file)
--- a/lib/psm.h
+++ b/lib/psm.h
@@ -118,9 +118,6 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage);
 RPM_GNUC_INTERNAL
 rpmRC rpmpsmScriptStage(rpmpsm psm, rpmTag scriptTag, rpmTag progTag);
 
-RPM_GNUC_INTERNAL
-void rpmpsmSetAsync(rpmpsm psm, int async);
-
 #ifdef __cplusplus
 }
 #endif
index ce5a7be..e4004df 100644 (file)
@@ -631,17 +631,6 @@ rpmVSFlags rpmtsSetVSFlags(rpmts ts, rpmVSFlags vsflags)
     return ovsflags;
 }
 
-int rpmtsUnorderedSuccessors(rpmts ts, int first)
-{
-    int unorderedSuccessors = 0;
-    if (ts != NULL) {
-       unorderedSuccessors = ts->unorderedSuccessors;
-       if (first >= 0)
-           ts->unorderedSuccessors = first;
-    }
-    return unorderedSuccessors;
-}
-
 const char * rpmtsRootDir(rpmts ts)
 {
     const char * rootDir = NULL;
index 215b28e..0b7c259 100644 (file)
@@ -371,14 +371,6 @@ rpmVSFlags rpmtsVSFlags(rpmts ts);
 rpmVSFlags rpmtsSetVSFlags(rpmts ts, rpmVSFlags vsflags);
 
 /** \ingroup rpmts
- * Set index of 1st element of successors.
- * @param ts           transaction set
- * @param first                new index of 1st element of successors
- * @return             previous value
- */
-int rpmtsUnorderedSuccessors(rpmts ts, int first);
-
-/** \ingroup rpmts
  * Get transaction rootDir, i.e. path to chroot(2).
  * @param ts           transaction set
  * @return             transaction rootDir
index e85f05b..6189fc1 100644 (file)
@@ -66,7 +66,6 @@ struct rpmts_s {
     rpmte * order;             /*!< Packages sorted by dependencies. */
     int orderCount;            /*!< No. of transaction elements. */
     int orderAlloced;          /*!< No. of allocated transaction elements. */
-    int unorderedSuccessors;   /*!< Index of 1st element of successors. */
     int ntrees;                        /*!< No. of dependency trees. */
     int maxDepth;              /*!< Maximum depth of dependency tree(s). */
 
index bafb275..5f5bc73 100644 (file)
@@ -1121,8 +1121,6 @@ static int rpmtsProcess(rpmts ts)
        if (rpmteOpen(p, ts, 1)) {
            rpmpsm psm = NULL;
            pkgStage stage = PSM_UNKNOWN;
-           int async = (rpmtsiOc(pi) >= rpmtsUnorderedSuccessors(ts, -1)) ? 
-                       1 : 0;
 
            switch (tetype) {
            case TR_ADDED:
@@ -1133,8 +1131,6 @@ static int rpmtsProcess(rpmts ts)
                break;
            }
            psm = rpmpsmNew(ts, p);
-           rpmpsmSetAsync(psm, async);
-
            (void) rpmswEnter(rpmtsOp(ts, op), 0);
            failed = rpmpsmStage(psm, stage);
            (void) rpmswExit(rpmtsOp(ts, op), 0);