[CVS] RPM: rpm/lib/ depends.c transaction.c
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: 29-Dec-2010 23:30:25 Branch: HEAD Handle: 2010122922302001 Modified files: rpm/lib depends.c transaction.c Log: - rpmbf: common variable names/values. Summary: RevisionChanges Path 1.464 +2 -2 rpm/lib/depends.c 1.431 +3 -1 rpm/lib/transaction.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.463 -r1.464 depends.c --- rpm/lib/depends.c 24 Dec 2010 19:52:01 - 1.463 +++ rpm/lib/depends.c 29 Dec 2010 22:30:20 - 1.464 @@ -94,11 +94,11 @@ } if (ts-rbf == NULL) { - static size_t nRemoves = 8192; /* XXX population estimate */ + static size_t n = 1;/* XXX population estimate */ static double e = 1.0e-4; size_t m = 0; size_t k = 0; - rpmbfParams(nRemoves, e, m, k); + rpmbfParams(n, e, m, k); ts-rbf = rpmbfNew(m, k, 0); } @@ . patch -p0 '@@ .' Index: rpm/lib/transaction.c $ cvs diff -u -r1.430 -r1.431 transaction.c --- rpm/lib/transaction.c 16 Dec 2010 14:21:44 - 1.430 +++ rpm/lib/transaction.c 29 Dec 2010 22:30:21 - 1.431 @@ -853,6 +853,7 @@ * the rpmdb that share the basename with one from * the transaction. * @param ts transaction set + * @param fileCount no. of files * @return rpmmi sorted by (package, fileNum) */ static @@ -868,13 +869,14 @@ size_t ns; void * ptr; static rpmTag _tag = RPMTAG_BASENAMES; +size_t n = (fileCount 10 ? fileCount : 10); static double e = 1.0e-4; size_t m = 0; size_t k = 0; rpmbf bf; FPSDEBUG(0, (stderr, -- %s(%p,%u)\n, __FUNCTION__, ts, (unsigned)fileCount)); -rpmbfParams(fileCount, e, m, k); +rpmbfParams(n, e, m, k); bf = rpmbfNew(m, k, 0); mi = rpmmiInit(rpmtsGetRdb(ts), _tag, NULL, 0); @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c
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-Dec-2010 20:52:01 Branch: HEAD Handle: 2010122419520100 Modified files: rpm/lib depends.c Log: - remove bogus comment. Summary: RevisionChanges Path 1.463 +0 -2 rpm/lib/depends.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.462 -r1.463 depends.c --- rpm/lib/depends.c 24 Dec 2010 14:31:04 - 1.462 +++ rpm/lib/depends.c 24 Dec 2010 19:52:01 - 1.463 @@ -1432,8 +1432,6 @@ goto exit; } if (Name[0] == '/') { - /* depFlags better be 0! */ - mi = rpmtsInitIterator(ts, RPMTAG_BASENAMES, Name, 0); (void) rpmmiPrune(mi, ts-removedPackages, ts-numRemovedPackages, 1); @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c psm.h rpmal.h rpmds.c rpmds.h rpmfc.c rp...
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: 06-Mar-2010 16:31:30 Branch: HEAD Handle: 2010030615312900 Modified files: rpm/lib depends.c psm.h rpmal.h rpmds.c rpmds.h rpmfc.c rpmfc.h rpmfi.c rpmfi.h rpmrollback.h rpmte.h rpmts.c Log: - lib: segfault avoidance with unit tests. Summary: RevisionChanges Path 1.461 +4 -4 rpm/lib/depends.c 2.81+1 -0 rpm/lib/psm.h 2.39+1 -0 rpm/lib/rpmal.h 2.167 +14 -6 rpm/lib/rpmds.c 2.81+4 -4 rpm/lib/rpmds.h 1.72+1 -0 rpm/lib/rpmfc.c 1.19+2 -6 rpm/lib/rpmfc.h 2.160 +2 -2 rpm/lib/rpmfi.c 2.82+1 -1 rpm/lib/rpmfi.h 2.3 +2 -0 rpm/lib/rpmrollback.h 2.73+1 -2 rpm/lib/rpmte.h 2.181 +2 -2 rpm/lib/rpmts.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.460 -r1.461 depends.c --- rpm/lib/depends.c 22 Feb 2010 16:15:14 - 1.460 +++ rpm/lib/depends.c 6 Mar 2010 15:31:29 - 1.461 @@ -16,15 +16,15 @@ #define _RPMDB_INTERNAL /* XXX response cache needs dbiOpen et al. */ #include rpmdb.h +#define _RPMEVR_INTERNAL +#include rpmds.h +#include rpmfi.h + #define _RPMTE_INTERNAL #include rpmte.h #define _RPMTS_INTERNAL #include rpmcli.h /* XXX rpmcliPackagesTotal */ -#define _RPMEVR_INTERNAL -#include rpmds.h -#include rpmfi.h - #include debug.h /*...@access tsortInfo @*/ @@ . patch -p0 '@@ .' Index: rpm/lib/psm.h $ cvs diff -u -r2.80 -r2.81 psm.h --- rpm/lib/psm.h 12 Feb 2010 12:32:08 - 2.80 +++ rpm/lib/psm.h 6 Mar 2010 15:31:29 - 2.81 @@ -13,6 +13,7 @@ typedef /*...@abstract@*/ /*...@refcounted@*/ struct rpmpsm_s * rpmpsm; #include rpmsq.h +#include rpmfi.h /* XXX rpmfi typedef */ /*...@-exportlocal@*/ /*...@unchecked@*/ @@ . patch -p0 '@@ .' Index: rpm/lib/rpmal.h $ cvs diff -u -r2.38 -r2.39 rpmal.h --- rpm/lib/rpmal.h 31 Jul 2008 02:40:06 - 2.38 +++ rpm/lib/rpmal.h 6 Mar 2010 15:31:29 - 2.39 @@ -6,6 +6,7 @@ * Structures used for managing added/available package lists. */ +#include rpmds.h #include rpmfi.h /*...@-exportlocal@*/ @@ . patch -p0 '@@ .' Index: rpm/lib/rpmds.c $ cvs diff -u -r2.166 -r2.167 rpmds.c --- rpm/lib/rpmds.c 28 Jan 2010 05:49:15 - 2.166 +++ rpm/lib/rpmds.c 6 Mar 2010 15:31:29 - 2.167 @@ -528,7 +528,7 @@ E = (he-p.ui32p ? he-p.ui32p[0] : 0); he-p.ptr = _free(he-p.ptr); -#if defined(NOTYET) || defined(RPM_VENDOR_MANDRIVA) +#if defined(RPM_VENDOR_MANDRIVA) he-tag = RPMTAG_DISTEPOCH; xx = headerGet(h, he, 0); D = (he-p.str ? he-p.str : NULL); @@ -536,6 +536,10 @@ /*...@-mods@*/ xx = headerNEVRA(h, Name, NULL, V, R, NULL); /*...@=mods@*/ +/* XXX segfault avoidance */ +if (Name == NULL)Name = xstrdup(N); +if (V == NULL) V = xstrdup(V); +if (R == NULL) R = xstrdup(R); t = xmalloc(sizeof(*N) + strlen(Name) + 1); N = (const char **) t; @@ -546,7 +550,7 @@ Name = _free(Name); nb = sizeof(*EVR) + 20 + strlen(V) + strlen(R) + sizeof(-); -#ifdef RPM_VENDOR_MANDRIVA +#if defined(RPM_VENDOR_MANDRIVA) nb += (D ? strlen(D) + sizeof(:) : 0); #endif t = xmalloc(nb); @@ -557,7 +561,7 @@ sprintf(t, %d:, E); t += strlen(t); t = stpcpy( stpcpy( stpcpy( t, V), -), R); -#ifdef RPM_VENDOR_MANDRIVA +#if defined(RPM_VENDOR_MANDRIVA) if (D != NULL) { t = stpcpy( stpcpy( t, :), D); D = _free(D); @@ -3995,12 +3999,16 @@ /*...@-mods@*/ (void) headerNEVRA(h, pkgN, NULL, V, R, NULL); /*...@=mods@*/ +/* XXX segfault avoidance */ +if (pkgN == NULL)pkgN = xstrdup(N); +if (V == NULL) V = xstrdup(V); +if (R == NULL) R = xstrdup(R); he-tag = RPMTAG_EPOCH; gotE = headerGet(h, he, 0); E = (he-p.ui32p ? he-p.ui32p[0] : 0); he-p.ptr =
[CVS] RPM: rpm/lib/ depends.c
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: 26-Jan-2010 18:16:15 Branch: HEAD Handle: 2010012617161400 Modified files: rpm/lib depends.c Log: - rpmbf: don't call rpmbfChk w NULL pointer (even if rpmbfChk now handles NULL). Summary: RevisionChanges Path 1.457 +1 -1 rpm/lib/depends.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.456 -r1.457 depends.c --- rpm/lib/depends.c 26 Jan 2010 15:22:13 - 1.456 +++ rpm/lib/depends.c 26 Jan 2010 17:16:14 - 1.457 @@ -2148,7 +2148,7 @@ if (*N == '/') { rpmfi fi = rpmteFI(p, RPMTAG_BASENAMES); rpmbf bf = rpmfiBloomFN(fi); - if (rpmbfChk(bf, N, strlen(N)) 0) + if (bf != NULL rpmbfChk(bf, N, strlen(N)) 0) return 0; } @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c rpmts.c rpmts.h
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: 17-Dec-2009 05:00:14 Branch: HEAD Handle: 2009121704001300 Modified files: rpm/lib depends.c rpmts.c rpmts.h Log: - rpmts: sum the added/erased package file counts. - rpmts: tune the rpmbf parameters to a given {n,e}. Summary: RevisionChanges Path 1.454 +12 -16 rpm/lib/depends.c 2.180 +2 -0 rpm/lib/rpmts.c 2.127 +2 -0 rpm/lib/rpmts.h patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.453 -r1.454 depends.c --- rpm/lib/depends.c 10 Dec 2009 18:52:18 - 1.453 +++ rpm/lib/depends.c 17 Dec 2009 04:00:13 - 1.454 @@ -7,6 +7,7 @@ #include rpmio.h #include rpmiotypes.h /* XXX fnpyKey */ #include rpmcb.h +#include rpmbf.h #include rpmmacro.h/* XXX rpmExpand(%{_dependency_whiteout} */ #include envvar.h #include ugid.h/* XXX user()/group() probes */ @@ -107,11 +108,12 @@ } if (ts-rbf == NULL) { - static size_t nRemoves = 4096; /* XXX population estimate */ - size_t _jiggery = 2;/* XXX todo: Bloom filter tuning? */ - size_t _k = _jiggery * 8; - size_t _m = _jiggery * (3 * nRemoves * _k) / 2; - ts-rbf = rpmbfNew(_m, _k, 0); + static size_t nRemoves = 8192; /* XXX population estimate */ + static double e = 1.0e-4; + size_t m = 0; + size_t k = 0; + rpmbfParams(nRemoves, e, m, k); + ts-rbf = rpmbfNew(m, k, 0); } if (ts-numRemovedPackages == ts-allocedRemovedPackages) { @@ -137,6 +139,7 @@ p = rpmteNew(ts, h, TR_REMOVED, NULL, NULL, hdrNum, depends); ts-order[ts-orderCount] = p; +ts-numErasedFiles += rpmfiFC(rpmteFI(p, RPMTAG_BASENAMES)); if (indexp != NULL) *indexp = ts-orderCount; ts-orderCount++; @@ -735,12 +738,14 @@ assert(p != NULL); if (duplicate oc ts-orderCount) { + ts-numAddedFiles -= rpmfiFC(rpmteFI(ts-order[oc], RPMTAG_BASENAMES)); /*...@-type -unqualifiedtr...@*/ ts-order[oc] = rpmteFree(ts-order[oc]); /*...@=type =unqualifiedtr...@*/ } ts-order[oc] = p; +ts-numAddedFiles += rpmfiFC(rpmteFI(p, RPMTAG_BASENAMES)); if (!duplicate) { ts-orderCount++; rpmcliPackagesTotal++; @@ -2140,17 +2145,8 @@ /* Avoid looking up files/directories that are owned by _THIS_ package. */ if (*N == '/') { rpmfi fi = rpmteFI(p, RPMTAG_BASENAMES); - int bingo = 0; - - fi = rpmfiInit(fi, 0); - while (rpmfiNext(fi) = 0) { - const char * fn = rpmfiFN(fi); - if (strcmp(N, fn)) - continue; - bingo = 1; - break; - } - if (bingo) + rpmbf bf = rpmfiBloomFN(fi); + if (rpmbfChk(bf, N, strlen(N))) return 0; } @@ . patch -p0 '@@ .' Index: rpm/lib/rpmts.c $ cvs diff -u -r2.179 -r2.180 rpmts.c --- rpm/lib/rpmts.c 13 Dec 2009 01:04:45 - 2.179 +++ rpm/lib/rpmts.c 17 Dec 2009 04:00:13 - 2.180 @@ -530,6 +530,8 @@ /*...@=type =unqualifiedtrans @*/ } pi = rpmtsiFree(pi); +ts-numAddedFiles = 0; +ts-numErasedFiles = 0; ts-orderCount = 0; ts-ntrees = 0; @@ . patch -p0 '@@ .' Index: rpm/lib/rpmts.h $ cvs diff -u -r2.126 -r2.127 rpmts.h --- rpm/lib/rpmts.h 10 Dec 2009 18:52:18 - 2.126 +++ rpm/lib/rpmts.h 17 Dec 2009 04:00:13 - 2.127 @@ -259,10 +259,12 @@ /*...@only@*/ rpmal addedPackages; /*! Set of packages being installed. */ int numAddedPackages;/*! No. added package instances. */ +int numAddedFiles; /*! No. of files in added packages. */ /*...@only@*/ rpmal erasedPackages;/*! Set of packages being erased. */ int numErasedPackages; /*! No. erased package instances. */ +int numErasedFiles; /*! No. of files in erased packages. */ #ifndef DYING /*...@only@*/ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c
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: 08-Dec-2009 19:25:39 Branch: HEAD Handle: 2009120818253900 Modified files: rpm/lib depends.c Log: - turn on dependency result caching. Summary: RevisionChanges Path 1.452 +1 -0 rpm/lib/depends.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.451 -r1.452 depends.c --- rpm/lib/depends.c 4 Dec 2009 04:18:51 - 1.451 +++ rpm/lib/depends.c 8 Dec 2009 18:25:39 - 1.452 @@ -46,6 +46,7 @@ int orIndex; }; +#define CACHE_DEPENDENCY_RESULT 1 #if defined(CACHE_DEPENDENCY_RESULT) /*...@unchecked@*/ int _cacheDependsRC = CACHE_DEPENDENCY_RESULT; @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c rpmts.h
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: 04-Dec-2009 05:18:51 Branch: HEAD Handle: 2009120404185100 Modified files: rpm/lib depends.c rpmts.h Log: - try to use hdrNum consistently. Summary: RevisionChanges Path 1.451 +9 -9 rpm/lib/depends.c 2.124 +2 -2 rpm/lib/rpmts.h patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.450 -r1.451 depends.c --- rpm/lib/depends.c 17 Nov 2009 00:23:05 - 1.450 +++ rpm/lib/depends.c 4 Dec 2009 04:18:51 - 1.451 @@ -79,12 +79,12 @@ * Add removed package instance to ordered transaction set. * @param ts transaction set * @param h header - * @param dboffset rpm database instance + * @param hdrNum rpm database instance * @retval *indexp removed element index (if not NULL) * @param dependsinstalled package of pair (or RPMAL_NOMATCH on erase) * @return 0 on success */ -static int removePackage(rpmts ts, Header h, uint32_t dboffset, +static int removePackage(rpmts ts, Header h, uint32_t hdrNum, /*...@null@*/ int * indexp, /*...@exposed@*/ /*...@dependent@*/ /*...@null@*/ alKey depends) /*...@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ @@ -95,7 +95,7 @@ /* Filter out duplicate erasures. */ if (ts-numRemovedPackages 0 ts-removedPackages != NULL) { uint32_t * needle = NULL; - needle = bsearch(dboffset, ts-removedPackages, ts-numRemovedPackages, + needle = bsearch(hdrNum, ts-removedPackages, ts-numRemovedPackages, sizeof(*ts-removedPackages), uintcmp); if (needle != NULL) { /* XXX lastx should be per-call, not per-ts. */ @@ -106,7 +106,7 @@ } if (ts-rbf == NULL) { - static size_t nRemoves = 4096; /* XXX poplation estimate */ + static size_t nRemoves = 4096; /* XXX population estimate */ size_t _jiggery = 2;/* XXX todo: Bloom filter tuning? */ size_t _k = _jiggery * 8; size_t _m = _jiggery * (3 * nRemoves * _k) / 2; @@ -120,8 +120,8 @@ } assert(ts-removedPackages != NULL); /* XXX can't happen. */ -rpmbfAdd(ts-rbf, dboffset, sizeof(dboffset)); -ts-removedPackages[ts-numRemovedPackages] = dboffset; +rpmbfAdd(ts-rbf, hdrNum, sizeof(hdrNum)); +ts-removedPackages[ts-numRemovedPackages] = hdrNum; ts-numRemovedPackages++; if (ts-numRemovedPackages 1) qsort(ts-removedPackages, ts-numRemovedPackages, @@ -134,7 +134,7 @@ /*...@=type =voidabstract @*/ } -p = rpmteNew(ts, h, TR_REMOVED, NULL, NULL, dboffset, depends); +p = rpmteNew(ts, h, TR_REMOVED, NULL, NULL, hdrNum, depends); ts-order[ts-orderCount] = p; if (indexp != NULL) *indexp = ts-orderCount; @@ -810,10 +810,10 @@ return ec; } -int rpmtsAddEraseElement(rpmts ts, Header h, uint32_t dboffset) +int rpmtsAddEraseElement(rpmts ts, Header h, uint32_t hdrNum) { int oc = -1; -int rc = removePackage(ts, h, dboffset, oc, RPMAL_NOMATCH); +int rc = removePackage(ts, h, hdrNum, oc, RPMAL_NOMATCH); if (rc == 0 oc = 0 oc ts-orderCount) { (void) rpmtsEraseDebuginfo(ts, ts-order[oc], h, RPMAL_NOMATCH); ts-teErase = ts-order[oc]; @@ . patch -p0 '@@ .' Index: rpm/lib/rpmts.h $ cvs diff -u -r2.123 -r2.124 rpmts.h --- rpm/lib/rpmts.h 17 Nov 2009 00:23:05 - 2.123 +++ rpm/lib/rpmts.h 4 Dec 2009 04:18:51 - 2.124 @@ -1096,10 +1096,10 @@ * Add package to be erased to transaction set. * @param ts transaction set * @param h header - * @param dboffset rpm database instance + * @param hdrNum rpm database instance * @return 0 on success */ -int rpmtsAddEraseElement(rpmts ts, Header h, uint32_t dboffset) +int rpmtsAddEraseElement(rpmts ts, Header h, uint32_t hdrNum) /*...@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ /*...@modifies ts, h, rpmGlobalMacroContext, fileSystem, internalState @*/; @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c
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: 06-Sep-2009 19:27:16 Branch: HEAD Handle: 2009090617271600 Modified files: rpm/lib depends.c Log: - fix: Fedorable openoffice has so so many dependency loops, I give up ... Summary: RevisionChanges Path 1.447 +7 -1 rpm/lib/depends.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.446 -r1.447 depends.c --- rpm/lib/depends.c 22 Aug 2009 22:12:02 - 1.446 +++ rpm/lib/depends.c 6 Sep 2009 17:27:16 - 1.447 @@ -2310,7 +2310,7 @@ int numOrderList; int npeer = 128; /* XXX more than deep enough for now. */ int * peer = memset(alloca(npeer*sizeof(*peer)), 0, (npeer*sizeof(*peer))); -int nrescans = 10; +int nrescans = 100; int _printed = 0; char deptypechar; size_t tsbytes; @@ -2321,6 +2321,9 @@ int qlen; int i, j; +if (_rpmts_debug) +fprintf(stderr, -- %s(%p) tsFlags 0x%x\n, __FUNCTION__, ts, rpmtsFlags(ts)); + #ifdef DYING rpmalMakeIndex(ts-addedPackages); #endif @@ -2806,6 +2809,9 @@ int rc = 0; int ourrc = 0; +if (_rpmts_debug) +fprintf(stderr, -- %s(%p) tsFlags 0x%x\n, __FUNCTION__, ts, rpmtsFlags(ts)); + (void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_CHECK), 0); /* Do lazy, readonly, open of rpm database. */ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c rpmrc.c
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: 13-May-2009 14:24:32 Branch: HEAD Handle: 2009051312243200 Modified files: rpm/lib depends.c rpmrc.c Log: * cpuinfoP in unsatisfiedDepend() didn't actually get loaded before rpmCpuinfo(), so we need to load it there first (with same memory loss as before :/) * reuse cpuinfoP in rpmShowRC() rather than loading it again Summary: RevisionChanges Path 1.443 +1 -1 rpm/lib/depends.c 2.284 +13 -8 rpm/lib/rpmrc.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.442 -r1.443 depends.c --- rpm/lib/depends.c 12 May 2009 21:16:45 - 1.442 +++ rpm/lib/depends.c 13 May 2009 12:24:32 - 1.443 @@ -1336,7 +1336,7 @@ if (NSType == RPMNS_TYPE_CPUINFO) { static int oneshot = -1; - if (oneshot) + if (oneshot cpuinfoP == NULL) oneshot = rpmdsCpuinfo(cpuinfoP, NULL); if (cpuinfoP == NULL) goto unsatisfied; @@ . patch -p0 '@@ .' Index: rpm/lib/rpmrc.c $ cvs diff -u -r2.283 -r2.284 rpmrc.c --- rpm/lib/rpmrc.c 12 May 2009 21:16:45 - 2.283 +++ rpm/lib/rpmrc.c 13 May 2009 12:24:32 - 2.284 @@ -45,6 +45,9 @@ /*...@unchecked@*/ int nplatpat = 0; +extern rpmds cpuinfoP; + + /** \ingroup rpmrc * Build and install arch/os table identifiers. @@ -522,7 +525,6 @@ miRE mi_re = NULL; int mi_nre = 0, xx, i; CVOG_t cvog = NULL; -extern rpmds cpuinfoP; struct stat st; char *yaml; rpmsyck_node *tmp, node; @@ -539,6 +541,7 @@ Fread(yaml, 1, st.st_size, fd); Fclose(fd); +xx = rpmdsCpuinfo(cpuinfoP, NULL); cpuinfoYaml = rpmSyckLoad(yaml); yaml = _free(yaml); htGetEntry(cpuinfoYaml-firstNode-value.map, cpuinfo, tmp, NULL, NULL); @@ -1229,8 +1232,9 @@ ds = NULL; fprintf(fp, \n); - xx = rpmdsCpuinfo(ds, NULL); - if (ds != NULL) { + if(cpuinfoP == NULL) + xx = rpmdsCpuinfo(cpuinfoP, NULL); + if (cpuinfoP != NULL) { #if defined(WITH_CPUINFO) const char * fn = libcpuinfo; #else @@ -1238,14 +1242,15 @@ #endif fprintf(fp, _(Features provided by current cpuinfo (from %s):\n), fn); - ds = rpmdsInit(ds); - while (rpmdsNext(ds) = 0) { - const char * DNEVR = rpmdsDNEVR(ds); + cpuinfoP = rpmdsInit(cpuinfoP); + while (rpmdsNext(cpuinfoP) = 0) { + const char * DNEVR = rpmdsDNEVR(cpuinfoP); if (DNEVR != NULL) fprintf(fp, %s\n, DNEVR+2); } - (void)rpmdsFree(ds); - ds = NULL; + (void)rpmdsFree(cpuinfoP); + cpuinfoP = NULL; + fprintf(fp, \n); } } @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c rpmrc.c
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: 12-May-2009 23:16:45 Branch: HEAD Handle: 2009051221164500 Modified files: rpm/lib depends.c rpmrc.c Log: make cpuinfoP in lib/depends.c non-static and reuse it rather than recreating another in rpmCpuinfo() Summary: RevisionChanges Path 1.442 +1 -1 rpm/lib/depends.c 2.283 +4 -10 rpm/lib/rpmrc.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.441 -r1.442 depends.c --- rpm/lib/depends.c 6 Apr 2009 00:21:21 - 1.441 +++ rpm/lib/depends.c 12 May 2009 21:16:45 - 1.442 @@ -821,7 +821,7 @@ /*...@refcounted@*/ /*...@null@*/ /*...@unchecked@*/ static rpmds rpmlibP = NULL; /*...@refcounted@*/ /*...@null@*/ /*...@unchecked@*/ -static rpmds cpuinfoP = NULL; +rpmds cpuinfoP = NULL; /*...@refcounted@*/ /*...@null@*/ /*...@unchecked@*/ static rpmds getconfP = NULL; /*...@refcounted@*/ /*...@null@*/ /*...@unchecked@*/ @@ . patch -p0 '@@ .' Index: rpm/lib/rpmrc.c $ cvs diff -u -r2.282 -r2.283 rpmrc.c --- rpm/lib/rpmrc.c 12 May 2009 19:17:53 - 2.282 +++ rpm/lib/rpmrc.c 12 May 2009 21:16:45 - 2.283 @@ -509,6 +509,7 @@ { rpmds cpufeature = rpmdsSingle(RPMTAG_REQUIRENAME, feature, EVR, RPMSENSE_PROBE); int ret = rpmdsMatch(cpufeature, cpuinfo); + (void)rpmdsFree(cpufeature); cpufeature = NULL; return ret; @@ -521,7 +522,7 @@ miRE mi_re = NULL; int mi_nre = 0, xx, i; CVOG_t cvog = NULL; -rpmds cpuinfo = NULL; +extern rpmds cpuinfoP; struct stat st; char *yaml; rpmsyck_node *tmp, node; @@ -538,10 +539,6 @@ Fread(yaml, 1, st.st_size, fd); Fclose(fd); -/* XXX: Probably not right..? */ -cpuinfo = rpmdsSingle(RPMTAG_PROVIDENAME, , , RPMSENSE_PROBE); -xx = rpmdsCpuinfo(cpuinfo, NULL); - cpuinfoYaml = rpmSyckLoad(yaml); yaml = _free(yaml); htGetEntry(cpuinfoYaml-firstNode-value.map, cpuinfo, tmp, NULL, NULL); @@ -556,7 +553,7 @@ const char *family = tmp[0]-value.key; int j; hashTable cpus = NULL; - if(rpmCpuinfoMatch(family, , cpuinfo)) { + if(rpmCpuinfoMatch(family, , cpuinfoP)) { if(htHasEntry(node[i].value.map, Arch)) { htGetEntry(node[i].value.map, Arch, tmp, NULL, NULL); rpmsyck_node arch = tmp[0]-value.seq; @@ -573,7 +570,7 @@ rpmsyck_node features = tmp[0]-value.seq; int k, match = 0; for(k = 0; features[k].type != T_END; k++) - if(features[k].type == T_STR !(match = rpmCpuinfoMatch(features[k].value.key, , cpuinfo))) break; + if(features[k].type == T_STR !(match = rpmCpuinfoMatch(features[k].value.key, , cpuinfoP))) break; if(!match) continue; } if(htHasEntry(arch[j].value.map, Name)) { @@ -613,9 +610,6 @@ cpuinfoYaml = rpmSyckFree(cpuinfoYaml); -(void)rpmdsFree(cpuinfo); -cpuinfo = NULL; - xx = mireAppend(RPMMIRE_REGEX, 0, noarch, NULL, mi_re, mi_nre); cpu = mi_re[0].pattern; @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c
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: 27-Mar-2009 16:04:29 Branch: HEAD Handle: 2009032715042900 Modified files: rpm/lib depends.c Log: - jbj: rpmtsOrder: unb0rk autobits filtering (but leave disabled). Summary: RevisionChanges Path 1.438 +1 -4 rpm/lib/depends.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.437 -r1.438 depends.c --- rpm/lib/depends.c 26 Mar 2009 20:09:01 - 1.437 +++ rpm/lib/depends.c 27 Mar 2009 15:04:29 - 1.438 @@ -2271,13 +2271,10 @@ /*...@unchecked@*/ #ifdef NOTYET static rpmuint32_t _autobits = _notpre(_ALL_REQUIRES_MASK); -#define isAuto(_x) ((_x) _autobits) #else -#if 0 static rpmuint32_t _autobits = 0x; #endif -#define isAuto(_x) (1) -#endif +#define isAuto(_x) ((_x) _autobits) /*...@unchecked@*/ static int slashDepth = 1; /* #slashes pemitted in parentdir deps. */ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: r...@rpm5.org Module: rpm Date: 06-Mar-2009 19:16:17 Branch: HEAD Handle: 2009030618161700 Modified files: rpm/lib depends.c Log: remove compile-time warning by disabling unused definition Summary: RevisionChanges Path 1.432 +2 -0 rpm/lib/depends.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.431 -r1.432 depends.c --- rpm/lib/depends.c 26 Jan 2009 22:36:04 - 1.431 +++ rpm/lib/depends.c 6 Mar 2009 18:16:17 - 1.432 @@ -2260,7 +2260,9 @@ static rpmuint32_t _autobits = _notpre(_ALL_REQUIRES_MASK); #define isAuto(_x) ((_x) _autobits) #else +#if 0 static rpmuint32_t _autobits = 0x; +#endif #define isAuto(_x) (1) #endif @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Per Øyvind Karlsen Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 01-Nov-2008 19:56:04 Branch: HEAD Handle: 2008110118560400 Modified files: rpm/lib depends.c Log: remove lost ';' Summary: RevisionChanges Path 1.425 +0 -1 rpm/lib/depends.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.424 -r1.425 depends.c --- rpm/lib/depends.c 28 Oct 2008 15:25:20 - 1.424 +++ rpm/lib/depends.c 1 Nov 2008 18:56:04 - 1.425 @@ -2647,7 +2647,6 @@ const char * dp; int msglvl = (anaconda || (rpmtsDFlags(ts) RPMDEPS_FLAG_DEPLOOPS)) ? RPMLOG_WARNING : RPMLOG_ERR; -; /* Unchain predecessor loop. */ rpmteTSI(p)-tsi_chain = NULL; @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Per Øyvind Karlsen Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 01-Nov-2008 20:10:40 Branch: HEAD Handle: 2008110119103900 Modified files: rpm/lib depends.c Log: use enumerator type 'rpmlogLvl' rather than 'int' for 'msglvl' Summary: RevisionChanges Path 1.426 +1 -1 rpm/lib/depends.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.425 -r1.426 depends.c --- rpm/lib/depends.c 1 Nov 2008 18:56:04 - 1.425 +++ rpm/lib/depends.c 1 Nov 2008 19:10:39 - 1.426 @@ -2645,7 +2645,7 @@ const char * nevra; #endif const char * dp; - int msglvl = (anaconda || (rpmtsDFlags(ts) RPMDEPS_FLAG_DEPLOOPS)) + rpmlogLvl msglvl = (anaconda || (rpmtsDFlags(ts) RPMDEPS_FLAG_DEPLOOPS)) ? RPMLOG_WARNING : RPMLOG_ERR; /* Unchain predecessor loop. */ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 22-Aug-2008 08:09:57 Branch: HEAD Handle: 2008082206095700 Modified files: rpm/lib depends.c Log: - jbj: oops. Summary: RevisionChanges Path 1.417 +2 -2 rpm/lib/depends.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.416 -r1.417 depends.c --- rpm/lib/depends.c 22 Aug 2008 04:43:09 - 1.416 +++ rpm/lib/depends.c 22 Aug 2008 06:09:57 - 1.417 @@ -259,10 +259,10 @@ const char * oharch; he-tag = RPMTAG_ARCH; xx = headerGet(h, he, 0); - arch = (xx he-p.str != NULL ? he-p.str : NULL) + arch = (xx he-p.str != NULL ? he-p.str : NULL); he-tag = RPMTAG_ARCH; xx = headerGet(oh, he, 0); - oharch = (xx he-p.str != NULL ? he-p.str : NULL) + oharch = (xx he-p.str != NULL ? he-p.str : NULL); if (arch != NULL oharch != NULL) { if (strcmp(noarch, arch) || strcmp(noarch, oharch)) { if (!_isCompatibleArch(arch, oharch)) { @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c package.c psm.c query.c rpmds.h rpmte.h ...
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 02-Aug-2008 18:49:56 Branch: HEAD Handle: 2008080216495401 Modified files: rpm/lib depends.c package.c psm.c query.c rpmds.h rpmte.h transaction.c Log: - jbj: propogate effects of rpmdb splint annotations. Summary: RevisionChanges Path 1.413 +2 -1 rpm/lib/depends.c 2.205 +1 -2 rpm/lib/package.c 2.306 +6 -2 rpm/lib/psm.c 2.207 +2 -1 rpm/lib/query.c 2.70+4 -2 rpm/lib/rpmds.h 2.52+2 -1 rpm/lib/rpmte.h 1.383 +2 -1 rpm/lib/transaction.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.412 -r1.413 depends.c --- rpm/lib/depends.c 2 Aug 2008 00:38:04 - 1.412 +++ rpm/lib/depends.c 2 Aug 2008 16:49:54 - 1.413 @@ -144,7 +144,8 @@ * @return 1 if headers are identical, 0 otherwise */ static int rpmHeadersIdentical(Header first, Header second) - /[EMAIL PROTECTED]/ + /[EMAIL PROTECTED] internalState @*/ + /[EMAIL PROTECTED] internalState @*/ { HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he)); const char * one, * two; @@ . patch -p0 '@@ .' Index: rpm/lib/package.c $ cvs diff -u -r2.204 -r2.205 package.c --- rpm/lib/package.c 2 Aug 2008 00:38:04 - 2.204 +++ rpm/lib/package.c 2 Aug 2008 16:49:54 - 2.205 @@ -77,12 +77,11 @@ } /[EMAIL PROTECTED]@*/ -rpmRC rpmReadPackageFile(rpmts ts, void * _fd, const char * fn, Header * hdrp) +rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp) { HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he)); HE_t she = memset(alloca(sizeof(*she)), 0, sizeof(*she)); pgpDig dig = rpmtsDig(ts); -FD_t fd = _fd; char buf[8*BUFSIZ]; ssize_t count; Header sigh = NULL; @@ . patch -p0 '@@ .' Index: rpm/lib/psm.c $ cvs diff -u -r2.305 -r2.306 psm.c --- rpm/lib/psm.c 2 Aug 2008 00:38:04 - 2.305 +++ rpm/lib/psm.c 2 Aug 2008 16:49:54 - 2.306 @@ -159,7 +159,9 @@ memset(psm, 0, sizeof(*psm)); psm-ts = rpmtsLink(ts, InstallSourcePackage); +/[EMAIL PROTECTED]@*//* Avoid void * _fd annotations for now. */ rpmrc = rpmReadPackageFile(ts, fd, InstallSourcePackage, h); +/[EMAIL PROTECTED]@*/ switch (rpmrc) { case RPMRC_NOTTRUSTED: case RPMRC_NOKEY: @@ -1349,7 +1351,8 @@ * @return tag value (0 on failure) */ static rpmuint32_t hLoadTID(Header h, rpmTag tag) - /[EMAIL PROTECTED]/ + /[EMAIL PROTECTED] internalState @*/ + /[EMAIL PROTECTED] internalState @*/ { HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he)); rpmuint32_t val; @@ -1370,7 +1373,8 @@ * @return 0 always */ static int hCopyTag(Header sh, Header th, rpmTag tag) - /[EMAIL PROTECTED] th @*/ + /[EMAIL PROTECTED] internalState @*/ + /[EMAIL PROTECTED] th, internalState @*/ { HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he)); int xx = 1; @@ . patch -p0 '@@ .' Index: rpm/lib/query.c $ cvs diff -u -r2.206 -r2.207 query.c --- rpm/lib/query.c 2 Aug 2008 00:38:04 - 2.206 +++ rpm/lib/query.c 2 Aug 2008 16:49:54 - 2.207 @@ -135,7 +135,8 @@ /** */ static inline /[EMAIL PROTECTED]@*/ const char * queryHeader(Header h, const char * qfmt) - /[EMAIL PROTECTED] h @*/ + /[EMAIL PROTECTED] internalState @*/ + /[EMAIL PROTECTED] h, internalState @*/ { const char * errstr = (unkown error); const char * str; @@ . patch -p0 '@@ .' Index: rpm/lib/rpmds.h $ cvs diff -u -r2.69 -r2.70 rpmds.h --- rpm/lib/rpmds.h 2 Aug 2008 00:38:04 - 2.69 +++ rpm/lib/rpmds.h 2 Aug 2008 16:49:55 - 2.70 @@ -201,7 +201,8 @@ */ /[EMAIL PROTECTED]@*/ rpmds rpmdsThis(Header h, rpmTag tagN, evrFlags Flags) - /[EMAIL PROTECTED]/; + /[EMAIL PROTECTED] internalState @*/ + /[EMAIL PROTECTED] internalState @*/; /**
[CVS] RPM: rpm/lib/ depends.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 29-Jul-2008 21:03:39 Branch: HEAD Handle: 2008072919033900 Modified files: rpm/lib depends.c Log: at least partially unbreak building of HEAD after recent rpmdb.h changes Summary: RevisionChanges Path 1.407 +0 -4 rpm/lib/depends.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.406 -r1.407 depends.c --- rpm/lib/depends.c 17 Jul 2008 14:37:45 - 1.406 +++ rpm/lib/depends.c 29 Jul 2008 19:03:39 - 1.407 @@ -13,11 +13,7 @@ #include envvar.h #include ugid.h/* XXX user()/group() probes */ -/* XXX CACHE_DEPENDENCY_RESULT deprecated, functionality being reimplemented */ -#undef CACHE_DEPENDENCY_RESULT -#if defined(CACHE_DEPNDENCY_RESULT) #define _RPMDB_INTERNAL /* XXX response cache needs dbiOpen et al. */ -#endif #include rpmdb.h #define _RPMEVR_INTERNAL @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c fsm.c poptALL.c psm.c query.c rpmchecksi...
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 03-Jul-2008 17:08:07 Branch: HEAD Handle: 2008070315080502 Modified files: rpm/lib depends.c fsm.c poptALL.c psm.c query.c rpmchecksig.c rpmfi.c rpmfi.h rpmte.c rpmts.c rpmts.h transaction.c rpm/rpmio rpmkeyring.h Log: - jbj: splint fiddles. Summary: RevisionChanges Path 1.404 +6 -0 rpm/lib/depends.c 2.170 +4 -0 rpm/lib/fsm.c 2.92+5 -4 rpm/lib/poptALL.c 2.301 +4 -1 rpm/lib/psm.c 2.203 +2 -0 rpm/lib/query.c 1.218 +3 -1 rpm/lib/rpmchecksig.c 2.124 +4 -0 rpm/lib/rpmfi.c 2.55+3 -1 rpm/lib/rpmfi.h 2.84+2 -0 rpm/lib/rpmte.c 2.149 +8 -2 rpm/lib/rpmts.c 2.100 +4 -2 rpm/lib/rpmts.h 1.373 +8 -8 rpm/lib/transaction.c 1.3 +16 -9 rpm/rpmio/rpmkeyring.h patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.403 -r1.404 depends.c --- rpm/lib/depends.c 6 Jun 2008 09:14:55 - 1.403 +++ rpm/lib/depends.c 3 Jul 2008 15:08:05 - 1.404 @@ -193,6 +193,8 @@ * @return 0 on success */ static int rpmtsAddUpgrades(rpmts ts, rpmte p, uint32_t hcolor, Header h) + /[EMAIL PROTECTED] rpmGlobalMacroContext, fileSystem @*/ + /[EMAIL PROTECTED] ts, p, rpmGlobalMacroContext, fileSystem @*/ { HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he)); uint32_t tscolor = rpmtsColor(ts); @@ -290,6 +292,8 @@ * @return no. of references from build set */ static int rpmtsEraseDebuginfo(rpmts ts, rpmte p, Header h, alKey pkgKey) + /[EMAIL PROTECTED] rpmGlobalMacroContext, fileSystem @*/ + /[EMAIL PROTECTED] ts, p, rpmGlobalMacroContext, fileSystem @*/ { HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he)); const void *keyval = NULL; @@ -374,6 +378,8 @@ * @return 0 on success */ static int rpmtsAddObsoletes(rpmts ts, rpmte p, uint32_t hcolor) + /[EMAIL PROTECTED] rpmGlobalMacroContext, fileSystem @*/ + /[EMAIL PROTECTED] ts, p, rpmGlobalMacroContext, fileSystem @*/ { uint32_t tscolor = rpmtsColor(ts); alKey pkgKey = rpmteAddedKey(p); @@ . patch -p0 '@@ .' Index: rpm/lib/fsm.c $ cvs diff -u -r2.169 -r2.170 fsm.c --- rpm/lib/fsm.c 4 Apr 2008 12:23:20 - 2.169 +++ rpm/lib/fsm.c 3 Jul 2008 15:08:05 - 2.170 @@ -668,7 +668,9 @@ fsm-goal = goal; if (cfd != NULL) { +/[EMAIL PROTECTED]@*//* FIX: XfdLink annotation */ fsm-cfd = fdLink(cfd, persist (fsm)); +/[EMAIL PROTECTED]@*/ pos = fdGetCpioPos(fsm-cfd); fdSetCpioPos(fsm-cfd, 0); } @@ -741,7 +743,9 @@ fsm-iter-ts = rpmtsFree(fsm-iter-ts); fsm-iter = mapFreeIterator(fsm-iter); if (fsm-cfd != NULL) { +/[EMAIL PROTECTED]@*//* FIX: XfdFree annotation */ fsm-cfd = fdFree(fsm-cfd, persist (fsm)); +/[EMAIL PROTECTED]@*/ fsm-cfd = NULL; } fsm-failedFile = NULL; @@ . patch -p0 '@@ .' Index: rpm/lib/poptALL.c $ cvs diff -u -r2.91 -r2.92 poptALL.c --- rpm/lib/poptALL.c 18 May 2008 02:19:03 - 2.91 +++ rpm/lib/poptALL.c 3 Jul 2008 15:08:05 - 2.92 @@ -218,7 +218,7 @@ size_t val_len; val_len = strlen(val); if (val[val_len - 1] == '\n') -fwrite(val, val_len, 1, stdout); +val_len = fwrite(val, val_len, 1, stdout); else fprintf(stdout, %s\n, val); val = _free(val); @@ -469,6 +469,7 @@ poptContext optCon; char *path_buf, *path, *path_next; int rc; +int xx; int i; #if defined(HAVE_MCHECK_H) defined(HAVE_MTRACE) @@ -531,7 +532,7 @@ path_buf = xstrdup(rpmpoptfiles); for (path = path_buf; path != NULL *path != '\0'; path = path_next) { const char **av; -int ac, i; +int ac; /* locate start of next path element */ path_next = strchr(path, ':'); @@ -543,7 +544,7 @@ /* glob-expand the path element */ ac =
[CVS] RPM: rpm/lib/ depends.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 23-May-2008 18:30:45 Branch: HEAD Handle: 2008052316304500 Modified files: rpm/lib depends.c Log: - jbj: oops, no rpmdbCount() debugging. Summary: RevisionChanges Path 1.400 +2 -0 rpm/lib/depends.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.399 -r1.400 depends.c --- rpm/lib/depends.c 23 May 2008 16:29:38 - 1.399 +++ rpm/lib/depends.c 23 May 2008 16:30:45 - 1.400 @@ -558,11 +558,13 @@ ts-teInstall = ts-order[oc]; +#if 0 {rpmTag tag = RPMTAG_SOURCERPM; const char * sourcerpm = rpmteSourcerpm(p); if (sourcerpm) fprintf(stderr, *** %s: %d in %s\n, rpmteNEVRA(p), rpmdbCount(rpmtsGetRdb(ts), tag, sourcerpm, 0), sourcerpm); } +#endif /* XXX rpmgi hack: Save header in transaction element if requested. */ if (upgrade 0x2) @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-May-2008 08:00:04 Branch: HEAD Handle: 2008051906000300 Modified files: rpm/lib depends.c Log: avoid compiler warning about unused variable Summary: RevisionChanges Path 1.397 +2 -0 rpm/lib/depends.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.396 -r1.397 depends.c --- rpm/lib/depends.c 2 May 2008 16:10:49 - 1.396 +++ rpm/lib/depends.c 19 May 2008 06:00:03 - 1.397 @@ -2351,7 +2351,9 @@ /* T13. Print predecessor chain from start of loop. */ while ((p = q) != NULL (q = rpmteTSI(p)-tsi_chain) != NULL) { +#if 0 const char * nevra; +#endif const char * dp; int msglvl = (anaconda || (rpmtsDFlags(ts) RPMDEPS_FLAG_DEPLOOPS)) ? RPMLOG_WARNING : RPMLOG_DEBUG; @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c rpmluaext.c rpm/rpmio/ rpmpgp.c rpmpgp.h
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 17-Mar-2008 10:50:02 Branch: HEAD Handle: 2008031709500101 Modified files: rpm/lib depends.c rpmluaext.c rpm/rpmio rpmpgp.c rpmpgp.h Log: resolve a compile-time warning related to enum vs. int intermixing in comparisons Summary: RevisionChanges Path 1.392 +1 -1 rpm/lib/depends.c 2.3 +1 -1 rpm/lib/rpmluaext.c 2.90+2 -2 rpm/rpmio/rpmpgp.c 2.72+2 -1 rpm/rpmio/rpmpgp.h patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.391 -r1.392 depends.c --- rpm/lib/depends.c 12 Mar 2008 16:17:52 - 1.391 +++ rpm/lib/depends.c 17 Mar 2008 09:50:01 - 1.392 @@ -814,7 +814,7 @@ filename = Name; digestHashAlgo = PGPHASHALGO_MD5; if ((cp = strchr(filename, ':')) != NULL) { -if ((algo = pgpHashAlgoStringToNumber(filename, cp-filename)) != -1) { +if ((algo = pgpHashAlgoStringToNumber(filename, cp-filename)) != PGPHASHALGO_ERROR) { digestHashAlgo = algo; filename = cp + 1; } @@ . patch -p0 '@@ .' Index: rpm/lib/rpmluaext.c $ cvs diff -u -r2.2 -r2.3 rpmluaext.c --- rpm/lib/rpmluaext.c 2 Jan 2008 12:37:48 - 2.2 +++ rpm/lib/rpmluaext.c 17 Mar 2008 09:50:01 - 2.3 @@ -80,7 +80,7 @@ /* fetch arguments */ if (lua_isstring(L, 1)) { -if ((algo = pgpHashAlgoStringToNumber(lua_tostring(L, 1), 0)) == -1) { +if ((algo = pgpHashAlgoStringToNumber(lua_tostring(L, 1), 0)) == PGPHASHALGO_ERROR) { (void)luaL_argerror(L, 1, digest type); return 0; } @@ . patch -p0 '@@ .' Index: rpm/rpmio/rpmpgp.c $ cvs diff -u -r2.89 -r2.90 rpmpgp.c --- rpm/rpmio/rpmpgp.c12 Mar 2008 19:41:13 - 2.89 +++ rpm/rpmio/rpmpgp.c17 Mar 2008 09:50:02 - 2.90 @@ -1481,7 +1481,7 @@ /[EMAIL PROTECTED]@*/ } -int pgpHashAlgoStringToNumber(const char *name, size_t name_len) +pgpHashAlgo pgpHashAlgoStringToNumber(const char *name, size_t name_len) { size_t i; @@ -1492,6 +1492,6 @@ for (i = 0; i sizeof(pgpHashTbl)/sizeof(pgpHashTbl[0]); i++) if (xstrncasecmp(name, pgpHashTbl[i].str, name_len) == 0) return pgpHashTbl[i].val; -return -1; +return PGPHASHALGO_ERROR; } @@ . patch -p0 '@@ .' Index: rpm/rpmio/rpmpgp.h $ cvs diff -u -r2.71 -r2.72 rpmpgp.h --- rpm/rpmio/rpmpgp.h10 Mar 2008 04:46:20 - 2.71 +++ rpm/rpmio/rpmpgp.h17 Mar 2008 09:50:02 - 2.72 @@ -410,6 +410,7 @@ * @todo Add SHA256. */ typedef enum pgpHashAlgo_e { +PGPHASHALGO_ERROR= -1, PGPHASHALGO_NONE = 0, PGPHASHALGO_MD5 = 1, /*! MD5 */ PGPHASHALGO_SHA1 = 2, /*! SHA-1 */ @@ -1437,7 +1438,7 @@ * @param name_len length of name or 0 for strlen(name) * @return PGPHASHALGO_name or -1 in case of error */ -int pgpHashAlgoStringToNumber(const char *name, size_t name_len) +pgpHashAlgo pgpHashAlgoStringToNumber(const char *name, size_t name_len) /[EMAIL PROTECTED]/; /** @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 26-Dec-2007 10:58:41 Branch: HEAD Handle: 2007122609584100 Modified files: rpm/lib depends.c Log: compare MD5 hex value on 'digest(/path) = hex' dependency case-insensitive to be less restrictive in syntax Summary: RevisionChanges Path 1.372 +1 -1 rpm/lib/depends.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.371 -r1.372 depends.c --- rpm/lib/depends.c 7 Dec 2007 19:54:18 - 1.371 +++ rpm/lib/depends.c 26 Dec 2007 09:58:41 - 1.372 @@ -799,7 +799,7 @@ xx = Fclose(fd);fd = NULL; xx = rpmDigestFinal(ctx, digest, digestlen, asAscii); - xx = (EVR *EVR digest *digest) ? strcmp(EVR, digest) : -1; + xx = (EVR *EVR digest *digest) ? strcasecmp(EVR, digest) : -1; /* XXX only equality makes sense for digest compares */ if ((Flags RPMSENSE_EQUAL) xx == 0) rc = 0; } @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ depends.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 25-Oct-2007 19:12:39 Branch: HEAD Handle: 2007102518123900 Modified files: rpm/lib depends.c Log: - typo. Summary: RevisionChanges Path 1.356 +1 -1 rpm/lib/depends.c patch -p0 '@@ .' Index: rpm/lib/depends.c $ cvs diff -u -r1.355 -r1.356 depends.c --- rpm/lib/depends.c 25 Oct 2007 15:26:03 - 1.355 +++ rpm/lib/depends.c 25 Oct 2007 17:12:39 - 1.356 @@ -400,7 +400,7 @@ /* Do lazy (readonly?) open of rpm database. */ if (rpmtsGetRdb(ts) == NULL rpmtsDBMode(ts) != -1) { - if ((ec = rpmtsOpenDB(ts, rpmtsDBMode(ts)) != 0) + if ((ec = rpmtsOpenDB(ts, rpmtsDBMode(ts)) != 0)) goto exit; } @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org