Switch back to early added packages rpmal populating
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 24 Sep 2012 08:57:55 +0000 (11:57 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 24 Sep 2012 08:57:55 +0000 (11:57 +0300)
- Basically reverts commit d10a9941326f7d397428c8ab0b4ba571cfc6c184
  which was just a temporary transition-period thing. Moving pointers
  dont bother us anymore...

lib/depends.c
lib/order.c

index 45f1e84..41fff96 100644 (file)
@@ -412,21 +412,11 @@ int rpmtsAddInstallElement(rpmts ts, Header h,
        tsmem->orderCount++;
     }
     
-    /*
-     * XXX Instant rpmal addition disabled at least for now to ease
-     * string -> pool id transition. Instead we need to nuke the entire
-     * added rpmal if it exists when adding new packages.
-     */
-#if 0
     if (tsmem->addedPackages == NULL) {
-       tsmem->addedPackages = rpmalCreate(5, rpmtsFlags(ts),
+       tsmem->addedPackages = rpmalCreate(tsmem->pool, 5, rpmtsFlags(ts),
                                           tscolor, rpmtsPrefColor(ts));
     }
     rpmalAdd(tsmem->addedPackages, p);
-#else
-    if (tsmem->addedPackages != NULL)
-       tsmem->addedPackages = rpmalFree(tsmem->addedPackages);
-#endif
 
     /* Add erasure elements for old versions and obsoletions on upgrades */
     /* XXX TODO: If either of these fails, we'd need to undo all additions */
@@ -649,7 +639,6 @@ static void checkInstDeps(rpmts ts, depCache dcache, rpmte te,
 
 int rpmtsCheck(rpmts ts)
 {
-    tsMembers tsmem = rpmtsMembers(ts);
     rpm_color_t tscolor = rpmtsColor(ts);
     rpmtsi pi = NULL; rpmte p;
     int closeatexit = 0;
@@ -665,9 +654,6 @@ int rpmtsCheck(rpmts ts)
        closeatexit = 1;
     }
 
-    if (tsmem->addedPackages == NULL)
-       tsmem->addedPackages = rpmtsCreateAl(ts, TR_ADDED);
-
     /* XXX FIXME: figure some kind of heuristic for the cache size */
     dcache = depCacheCreate(5001, rstrhash, strcmp,
                                     (depCacheFreeKey)rfree, NULL);
index 170724b..c0ef547 100644 (file)
@@ -556,10 +556,6 @@ int rpmtsOrder(rpmts ts)
 
     (void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_ORDER), 0);
 
-    /* Create installed package index if not already done */
-    if (tsmem->addedPackages == NULL)
-       tsmem->addedPackages = rpmtsCreateAl(ts, TR_ADDED);
-
     /* Create erased package index. */
     erasedPackages = rpmtsCreateAl(ts, TR_REMOVED);