From: Panu Matilainen Date: Mon, 24 Sep 2012 08:57:55 +0000 (+0300) Subject: Switch back to early added packages rpmal populating X-Git-Tag: rpm-4.11.0-alpha~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=824fd200b014b3b680fe6b01fc271a68fedd103e;p=platform%2Fupstream%2Frpm.git Switch back to early added packages rpmal populating - Basically reverts commit d10a9941326f7d397428c8ab0b4ba571cfc6c184 which was just a temporary transition-period thing. Moving pointers dont bother us anymore... --- diff --git a/lib/depends.c b/lib/depends.c index 45f1e84..41fff96 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -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); diff --git a/lib/order.c b/lib/order.c index 170724b..c0ef547 100644 --- a/lib/order.c +++ b/lib/order.c @@ -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);