RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 16-Dec-2010 15:20:37 Branch: rpm-5_4 Handle: 2010121614203601 Modified files: (Branch: rpm-5_4) rpm CHANGES rpm/lib transaction.c Log: - fix: %config handling broken while refactoring a loop. Summary: Revision Changes Path 1.3501.2.10 +1 -0 rpm/CHANGES 1.429.2.1 +5 -16 rpm/lib/transaction.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.3501.2.9 -r1.3501.2.10 CHANGES --- rpm/CHANGES 16 Dec 2010 14:14:22 -0000 1.3501.2.9 +++ rpm/CHANGES 16 Dec 2010 14:20:36 -0000 1.3501.2.10 @@ -4,6 +4,7 @@ - jbj: rpm.spec: adjust to reality (popt needs to be in tarball, todo++). 5.3.6 -> 5.3.7: + - jbj: fix: %config handling broken while refactoring a loop. - jbj: rpmmi: lazily instantiate the basenames header set. - jbj: re-add the lazy creator avoiding self LOOP's in ordering pkgs during installs using parentdir relations. @@ . patch -p0 <<'@@ .' Index: rpm/lib/transaction.c ============================================================================ $ cvs diff -u -r1.429 -r1.429.2.1 transaction.c --- rpm/lib/transaction.c 24 Apr 2010 14:29:16 -0000 1.429 +++ rpm/lib/transaction.c 16 Dec 2010 14:20:37 -0000 1.429.2.1 @@ -75,7 +75,6 @@ { unsigned int fx = rpmfiFX(fi); int isCfgFile = ((rpmfiFFlags(otherFi) | rpmfiFFlags(fi)) & RPMFILE_CONFIG); - #ifdef REFERENCE rpmfs fs = rpmteGetFileStates(p); if (XFA_SKIPPING(rpmfsGetAction(fs, fx))) @@ -936,7 +935,7 @@ rpmte p; rpmmi mi; - Header h, newheader; + Header h; rpmfi fi; const char * oldDir; @@ -947,6 +946,7 @@ int rc = 0; FPSDEBUG(0, (stderr, "--> %s(%p,%u,%p,%p)\n", __FUNCTION__, ts, (unsigned)fileCount, ht, fpc)); + rpmlog(RPMLOG_DEBUG, D_("computing file dispositions\n")); /* XXX fileCount == 0 installing src.rpm's */ @@ -955,23 +955,15 @@ mi = rpmtsFindBaseNamesInDB(ts, fileCount); - if (mi == NULL || rpmmiCount(mi) == 0) { - mi = rpmmiFree(mi); - return rc; - } - /* Loop over all packages from the rpmdb */ - h = newheader = rpmmiNext(mi); - while (h != NULL) { + while ((h = rpmmiNext(mi)) != NULL) { fingerPrint fp; - uint32_t hdrNum; - uint32_t tagNum; + uint32_t hdrNum = rpmmiInstance(mi); + uint32_t tagNum = rpmmiBNTag(mi); int i; int j; /* Is this package being removed? */ - hdrNum = rpmmiInstance(mi); - tagNum = rpmmiBNTag(mi); beingRemoved = 0; if (ts->removedPackages != NULL) for (j = 0; j < ts->numRemovedPackages; j++) { @@ -981,7 +973,6 @@ /*...@innerbreak@*/ break; } - h = headerLink(h); he->tag = RPMTAG_BASENAMES; xx = headerGet(h, he, 0); BN.argv = (xx ? he->p.argv : NULL); @@ -1070,8 +1061,6 @@ DI.ptr = _free(DI.ptr); DN.ptr = _free(DN.ptr); BN.ptr = _free(BN.ptr); - h = headerFree(h); - h = newheader; } mi = rpmmiFree(mi); @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org