[CVS] RPM: rpm-5_3: rpm/ CHANGES rpm/lib/ transaction.c

2011-10-19 Thread Per �yvind Karlsen
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs   Email:  pkarl...@rpm5.org
  Module: rpm  Date:   19-Oct-2011 15:00:53
  Branch: rpm-5_3  Handle: 2011101913005201

  Modified files:   (Branch: rpm-5_3)
rpm CHANGES
rpm/lib transaction.c

  Log:
fix different epoch being ignored when comparing two packages with
same NVRA.

  Summary:
RevisionChanges Path
1.3296.2.251+2  -0  rpm/CHANGES
1.428.2.8   +22 -16 rpm/lib/transaction.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.3296.2.250 -r1.3296.2.251 CHANGES
  --- rpm/CHANGES   15 Oct 2011 12:58:19 -  1.3296.2.250
  +++ rpm/CHANGES   19 Oct 2011 13:00:52 -  1.3296.2.251
  @@ -1,4 +1,6 @@
   5.3.12 - 5.3.13
  +- proyvind: fix different epoch being ignored when comparing two packages
  + with same NVRA.
   - proyvind: add %ruby_sitedir and %ruby_vendor macros.
   - proyvind: really always invoke %clean at end
   - proyvind: add sparc64v2 arch to %sparcx.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/transaction.c
  
  $ cvs diff -u -r1.428.2.7 -r1.428.2.8 transaction.c
  --- rpm/lib/transaction.c 12 Jul 2011 10:44:41 -  1.428.2.7
  +++ rpm/lib/transaction.c 19 Oct 2011 13:00:53 -  1.428.2.8
  @@ -1169,28 +1169,34 @@
RPMMIRE_STRCMP, rpmteNEVRA(p), keys);
nkeys = argvCount(keys);
   
  -#if defined(RPM_VENDOR_MANDRIVA)
/* mdvbz: #63711
  -  * workaround for distepoch never being added to RPMTAG_NVRA yet,
  -  * leading to packages of same EVRA but with different distepoch
  +  * workaround for epoch  distepoch not being part of RPMTAG_NVRA,
  +  * leading to packages of same VRA but with different epoch or 
distepoch
 * being treated as the same package */
if (nkeys  0) {
  - int i;
  - for (i = 0; i  nkeys; i++) {
  - rpmmi mi = rpmtsInitIterator(ts, RPMTAG_NVRA, keys[i], 0);
  - Header h;
  - while ((h = rpmmiNext(mi)) != NULL) {
  - HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
  - he-tag = RPMTAG_DISTEPOCH;
  - xx = headerGet(h, he, 0);
  - if (strcmp(he-p.str ? he-p.str : , rpmteD(p) ? 
rpmteD(p) : ))
  - nkeys--;
  - he-p.ptr = _free(he-p.ptr);
  + int i, t;
  + rpmTag tags[2] = { RPMTAG_EPOCH, RPMTAG_DISTEPOCH };
  + for (t = 0; t  2; t++) {
  + for (i = 0; i  nkeys; i++) {
  + rpmmi mi = rpmtsInitIterator(ts, RPMTAG_NVRA, keys[i], 
0);
  + Header h;
  + while ((h = rpmmiNext(mi)) != NULL) {
  + HE_t he = memset(alloca(sizeof(*he)), 0, 
sizeof(*he));
  + const char *val = NULL;
  + he-tag = tags[t];
  + xx = headerGet(h, he, 0);
  + if (he-tag == RPMTAG_EPOCH)
  + val = rpmteE(p);
  + else if (he-tag == RPMTAG_DISTEPOCH)
  + val = rpmteD(p);
  + if (strcmp(he-p.str ? he-p.str : , val ? val : 
))
  + nkeys--;
  + he-p.ptr = _free(he-p.ptr);
  + }
  + mi = rpmmiFree(mi);
}
  - mi = rpmmiFree(mi);
}
}
  -#endif
if (nkeys  0)
rpmpsAppend(ps, RPMPROB_PKG_INSTALLED,
rpmteNEVR(p), rpmteKey(p),
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_3: rpm/ CHANGES rpm/lib/ transaction.c

2010-12-16 Thread Jeff Johnson
  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:22:37
  Branch: rpm-5_3  Handle: 2010121614223601

  Modified files:   (Branch: rpm-5_3)
rpm CHANGES
rpm/lib transaction.c

  Log:
- fix: %config handling broken while refactoring a loop.

  Summary:
RevisionChanges Path
1.3296.2.141+1  -0  rpm/CHANGES
1.428.2.2   +5  -16 rpm/lib/transaction.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.3296.2.140 -r1.3296.2.141 CHANGES
  --- rpm/CHANGES   16 Dec 2010 14:18:10 -  1.3296.2.140
  +++ rpm/CHANGES   16 Dec 2010 14:22:36 -  1.3296.2.141
  @@ -1,4 +1,5 @@
   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.428.2.1 -r1.428.2.2 transaction.c
  --- rpm/lib/transaction.c 24 Apr 2010 14:22:54 -  1.428.2.1
  +++ rpm/lib/transaction.c 16 Dec 2010 14:22:37 -  1.428.2.2
  @@ -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 Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_3: rpm/ CHANGES rpm/lib/ transaction.c

2010-04-24 Thread Jeff Johnson
  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:   24-Apr-2010 16:22:54
  Branch: rpm-5_3  Handle: 2010042414225301

  Modified files:   (Branch: rpm-5_3)
rpm CHANGES
rpm/lib transaction.c

  Log:
- rpmfps: don't bother w file fingerprints for *.src.rpm installs.

  Summary:
RevisionChanges Path
1.3296.2.5  +1  -0  rpm/CHANGES
1.428.2.1   +6  -5  rpm/lib/transaction.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.3296.2.4 -r1.3296.2.5 CHANGES
  --- rpm/CHANGES   24 Apr 2010 14:21:10 -  1.3296.2.4
  +++ rpm/CHANGES   24 Apr 2010 14:22:53 -  1.3296.2.5
  @@ -4,6 +4,7 @@
   - jbj: resurrect make dist.
   - jbj: resurrect make distcheck (fails as always in file/*).
   - jbj: rpmbf: sanity checks on rpmbfParam(n,e) arguments.
  +- jbj: rpmfps: don't bother w file fingerprints for *.src.rpm installs.
   
   5.2b1 - 5.3a1
   - jbj: nix: stub-in rpmnix{Env,Hash,Instantiate,Store,Worker} noop 
methods.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/transaction.c
  
  $ cvs diff -u -r1.428 -r1.428.2.1 transaction.c
  --- rpm/lib/transaction.c 21 Feb 2010 17:17:37 -  1.428
  +++ rpm/lib/transaction.c 24 Apr 2010 14:22:54 -  1.428.2.1
  @@ -949,6 +949,10 @@
   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 */
  +if (fileCount == 0)
  + return rc;
  +
   mi = rpmtsFindBaseNamesInDB(ts, fileCount);
   
   if (mi == NULL || rpmmiCount(mi) == 0) {
  @@ -1535,8 +1539,6 @@
   /* ===
* Compute file disposition for each package in transaction set.
*/
  -rpmlog(RPMLOG_DEBUG, D_(computing file dispositions\n));
  -
   #ifdef   REFERENCE
   rpmtsCheckInstalledFiles(ts, fileCount, ht, fpc);
   #else/* REFERENCE */
  @@ -1554,9 +1556,8 @@
int i;
fi = rpmfiInit(fi, 0);
if (fi != NULL)
  - while ((i = rpmfiNext(fi)) = 0) {
  + while ((i = rpmfiNext(fi)) = 0)
fi-actions[i] = FA_CREATE;
  - }
continue;
}
   
  @@ -2042,7 +2043,7 @@
   
   FPSDEBUG(0, (stderr, -- %s(%p,%p,0x%x)\n, __FUNCTION__, ts, okProbs, 
ignoreSet));
   if (_rpmts_debug)
  -fprintf(stderr, -- %s(%p,0x%x,0x%x) tsFlags 0x%x\n, __FUNCTION__, ts, 
(unsigned) okProbs, (unsigned) ignoreSet, rpmtsFlags(ts));
  +fprintf(stderr, -- %s(%p,%p,0x%x) tsFlags 0x%x\n, __FUNCTION__, ts, 
okProbs, (unsigned) ignoreSet, rpmtsFlags(ts));
   
   /* XXX programmer error segfault avoidance. */
   if (rpmtsNElements(ts) = 0) {
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org