[CVS] RPM: rpm/lib/ rpmfc.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: 01-Apr-2011 14:27:28 Branch: HEAD Handle: 2011040112272800 Modified files: rpm/lib rpmfc.c Log: filter overlapping auto generated dependencies as well under mandriva #ifdef Summary: RevisionChanges Path 1.79+26 -0 rpm/lib/rpmfc.c patch -p0 <<'@@ .' Index: rpm/lib/rpmfc.c $ cvs diff -u -r1.78 -r1.79 rpmfc.c --- rpm/lib/rpmfc.c 1 Apr 2011 05:08:12 - 1.78 +++ rpm/lib/rpmfc.c 1 Apr 2011 12:27:28 - 1.79 @@ -513,6 +513,32 @@ ds = rpmdsSingle(tagN, N, EVR, Flags); +#if defined(RPM_VENDOR_MANDRIVA) /* filter-overlapping-dependencies */ + int overlap = 0; + if (*depsp) { + int ix = rpmdsSearch(*depsp, ds); + if (ix >= 0) { + EVR_t lEVR = rpmEVRnew(RPMSENSE_ANY, 0), + rEVR = rpmEVRnew(RPMSENSE_ANY, 0); + + rpmdsSetIx(*depsp, ix); + + rpmEVRparse(rpmdsEVR(*depsp), lEVR); + rpmEVRparse(EVR, rEVR); + lEVR->Flags = rpmdsFlags(*depsp) | RPMSENSE_EQUAL; + rEVR->Flags = Flags | RPMSENSE_EQUAL; + + if (rpmEVRcompare(lEVR, rEVR) < 0) { + (*depsp)->EVR[(*depsp)->i] = EVR; + (*depsp)->Flags[(*depsp)->i] = Flags; + overlap = 1; + } + lEVR = rpmEVRfree(lEVR); + rEVR = rpmEVRfree(rEVR); + } + } + if (!overlap) +#endif /* Add to package dependencies. */ xx = rpmdsMerge(depsp, ds); @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ rpmfc.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: 01-Apr-2011 05:21:04 Branch: HEAD Handle: 2011040103210300 Modified files: rpm/lib rpmfc.c Log: nicer for .gemspec suffix Summary: RevisionChanges Path 1.77+2 -3 rpm/lib/rpmfc.c patch -p0 <<'@@ .' Index: rpm/lib/rpmfc.c $ cvs diff -u -r1.76 -r1.77 rpmfc.c --- rpm/lib/rpmfc.c 1 Apr 2011 02:02:17 - 1.76 +++ rpm/lib/rpmfc.c 1 Apr 2011 03:21:03 - 1.77 @@ -1036,10 +1036,9 @@ if (!strncmp(fn, "/python", sizeof("/python")-1)) fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON; else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1)) { - const char *gem = strstr(fn, "specifications"); fc->fcolor->vals[fc->ix] |= RPMFC_RUBY; - if (gem && (gem = strstr(gem, ".gemspec")) && - gem[sizeof(".gemspec")-1] == '\0') + if ((fn = strstr(fn, "/specifications/")) && + (fn = rindex(fn, '.')) && !strcmp(fn, ".gemspec")) fc->fcolor->vals[fc->ix] |= RPMFC_MODULE; } } @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ rpmfc.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: 21-Mar-2010 01:15:18 Branch: HEAD Handle: 2010032100151600 Modified files: rpm/lib rpmfc.c Log: - rpmfc: eliminate -vv spewage, use --miredebug is/when needed. - rpmfc: fix: don't add literal macro pattern filters if not defined. Summary: RevisionChanges Path 1.73+24 -11 rpm/lib/rpmfc.c patch -p0 <<'@@ .' Index: rpm/lib/rpmfc.c $ cvs diff -u -r1.72 -r1.73 rpmfc.c --- rpm/lib/rpmfc.c 6 Mar 2010 15:31:29 - 1.72 +++ rpm/lib/rpmfc.c 21 Mar 2010 00:15:16 - 1.73 @@ -340,12 +340,14 @@ int i; s = rpmExpand(str, NULL); -if (s) { +if (s && *s) { xx = poptParseArgvString(s, &ac, (const char ***)&av); s = _free(s); } -if (ac == 0 || av == NULL || *av == NULL) +if (ac == 0 || av == NULL || *av == NULL) { + s = _free(s); goto exit; +} for (i = 0; i < ac; i++) { xx = mireAppend(RPMMIRE_REGEX, 0, av[i], NULL, &mire, &nmire); @@ -377,7 +379,9 @@ int i; for (i = 0; i < nmire; i++) { +#ifdef DYING /* XXX noisy. use --miredebug if you need this spewage */ rpmlog(RPMLOG_DEBUG, D_("Checking %c: '%s'\n"), deptype, str); +#endif if ((xx = mireRegexec(mire + i, str, 0)) < 0) continue; rpmlog(RPMLOG_NOTICE, _("Skipping %c: '%s'\n"), deptype, str); @@ -981,17 +985,26 @@ int j; if (_filter_execs) { - fc->Pnmire = 0; fc->PFnmire = 0; - fc->Rnmire = 0; + fc->PFmires = rpmfcExpandRegexps("%{?__noautoprovfiles}", &fc->PFnmire); + if (fc->PFnmire > 0) + rpmlog(RPMLOG_DEBUG, D_("added %d %%__noautoprovfiles patterns.\n"), + fc->PFnmire); fc->RFnmire = 0; - - fc->PFmires = rpmfcExpandRegexps("%{__noautoprovfiles}", &fc->PFnmire); - fc->RFmires = rpmfcExpandRegexps("%{__noautoreqfiles}", &fc->RFnmire); - fc->Pmires = rpmfcExpandRegexps("%{__noautoprov}", &fc->Pnmire); - fc->Rmires = rpmfcExpandRegexps("%{__noautoreq}", &fc->Rnmire); - rpmlog(RPMLOG_DEBUG, D_("%i _noautoprov patterns.\n"), fc->Pnmire); - rpmlog(RPMLOG_DEBUG, D_("%i _noautoreq patterns.\n"), fc->Rnmire); + fc->RFmires = rpmfcExpandRegexps("%{?__noautoreqfiles}", &fc->RFnmire); + if (fc->RFnmire > 0) + rpmlog(RPMLOG_DEBUG, D_("added %d %%__noautoreqfiles patterns.\n"), + fc->RFnmire); + fc->Pnmire = 0; + fc->Pmires = rpmfcExpandRegexps("%{?__noautoprov}", &fc->Pnmire); + if (fc->Pnmire > 0) + rpmlog(RPMLOG_DEBUG, D_("added %d %%__noautoprov patterns.\n"), + fc->Pnmire); + fc->Rnmire = 0; + fc->Rmires = rpmfcExpandRegexps("%{?__noautoreq}", &fc->Rnmire); + if (fc->Rnmire > 0) + rpmlog(RPMLOG_DEBUG, D_("added %d %%__noautoreq patterns.\n"), + fc->Rnmire); } /* Make sure something didn't go wrong previously! */ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ rpmfc.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: 07-Dec-2009 22:39:04 Branch: HEAD Handle: 2009120721390400 Modified files: rpm/lib rpmfc.c Log: - rpmfc: ensure rpmfc from pool is initialized to zero. Summary: RevisionChanges Path 1.69+3 -1 rpm/lib/rpmfc.c patch -p0 <<'@@ .' Index: rpm/lib/rpmfc.c $ cvs diff -u -r1.68 -r1.69 rpmfc.c --- rpm/lib/rpmfc.c 18 Nov 2009 17:17:17 - 1.68 +++ rpm/lib/rpmfc.c 7 Dec 2009 21:39:04 - 1.69 @@ -1861,7 +1861,9 @@ NULL, NULL, rpmfcFini); pool = _rpmfcPool; } -return (rpmfc) rpmioGetPool(pool, sizeof(*fc)); +fc = (rpmfc) rpmioGetPool(pool, sizeof(*fc)); +memset(((char *)fc)+sizeof(fc->_item), 0, sizeof(*fc)-sizeof(fc->_item)); +return fc; } rpmfc rpmfcNew(void) @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ rpmfc.c rpm/rpmio/ rpmmg.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Anders F. Björklund Root: /v/rpm/cvs Email: a...@rpm5.org Module: rpm Date: 11-Apr-2009 16:17:58 Branch: HEAD Handle: 2009041114175800 Modified files: rpm/lib rpmfc.c rpm/rpmio rpmmg.c Log: initialize variables, to avoid missing symbols with %standalone on darwin Summary: RevisionChanges Path 1.65+1 -1 rpm/lib/rpmfc.c 2.11+1 -1 rpm/rpmio/rpmmg.c patch -p0 <<'@@ .' Index: rpm/lib/rpmfc.c $ cvs diff -u -r1.64 -r1.65 rpmfc.c --- rpm/lib/rpmfc.c 6 Apr 2009 00:21:21 - 1.64 +++ rpm/lib/rpmfc.c 11 Apr 2009 14:17:58 - 1.65 @@ -1836,7 +1836,7 @@ /*...@=mustmod@*/ /*...@unchecked@*/ /*...@only@*/ /*...@null@*/ -rpmioPool _rpmfcPool; +rpmioPool _rpmfcPool = NULL; static rpmfc rpmfcGetPool(/*...@null@*/ rpmioPool pool) /*...@globals _rpmfcPool, fileSystem, internalState @*/ @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmmg.c $ cvs diff -u -r2.10 -r2.11 rpmmg.c --- rpm/rpmio/rpmmg.c 25 Mar 2009 20:26:47 - 2.10 +++ rpm/rpmio/rpmmg.c 11 Apr 2009 14:17:58 - 2.11 @@ -37,7 +37,7 @@ /*...@=mustmod@*/ /*...@unchecked@*/ /*...@only@*/ /*...@null@*/ -rpmioPool _rpmmgPool; +rpmioPool _rpmmgPool = NULL; static rpmmg rpmmgGetPool(/*...@null@*/ rpmioPool pool) /*...@globals _rpmmgPool, fileSystem @*/ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ rpmfc.c rpmfc.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: 18-Jan-2009 18:58:11 Branch: HEAD Handle: 2009011817581100 Modified files: rpm/lib rpmfc.c rpmfc.h Log: - jbj: collapse fc->find{prov,req} into inverse !fc->skip{Prov,Req} logic. - jbj: dump AUTODEP_PKGNAMES patch, not useful/used by PLD. Summary: RevisionChanges Path 1.58+19 -178rpm/lib/rpmfc.c 1.14+4 -6 rpm/lib/rpmfc.h patch -p0 <<'@@ .' Index: rpm/lib/rpmfc.c $ cvs diff -u -r1.57 -r1.58 rpmfc.c --- rpm/lib/rpmfc.c 18 Jan 2009 15:45:59 - 1.57 +++ rpm/lib/rpmfc.c 18 Jan 2009 17:58:11 - 1.58 @@ -24,13 +24,6 @@ #include #include -#ifdef SUPPORT_PLD_DEPFILTER -#ifdef AUTODEP_PKGNAMES /* define to use package names in R */ -#include -#include -#endif /* AUTODEF_PKGNAMES */ -#endif /* SUPPORT_PLD_DEPFILTER */ - #include "debug.h" /*...@access rpmds @*/ @@ -818,7 +811,7 @@ se++; #ifdef SUPPORT_PLD_DEPFILTER - if (fc->findreq + if (!fc->skipReq && !rpmfcMatchRegexps(fc->Rnoauto, fc->Rnoauto_c, s, 'R')) #endif /* SUPPORT_PLD_DEPFILTER */ if (is_executable) { @@ -851,52 +844,28 @@ if (fc->fcolor->vals[fc->ix] & RPMFC_PERL) { if (strncmp(fn, "/usr/share/doc/", sizeof("/usr/share/doc/")-1)) { -#ifdef SUPPORT_PLD_DEPFILTER - if (fc->findprov) -#endif /* SUPPORT_PLD_DEPFILTER */ if (fc->fcolor->vals[fc->ix] & RPMFC_MODULE) xx = rpmfcHelper(fc, 'P', "perl"); -#ifdef SUPPORT_PLD_DEPFILTER - if (fc->findreq) -#endif /* SUPPORT_PLD_DEPFILTER */ if (is_executable || (fc->fcolor->vals[fc->ix] & RPMFC_MODULE)) xx = rpmfcHelper(fc, 'R', "perl"); } } else if (fc->fcolor->vals[fc->ix] & RPMFC_PYTHON) { -#ifdef SUPPORT_PLD_DEPFILTER - if (fc->findprov) -#endif /* SUPPORT_PLD_DEPFILTER */ xx = rpmfcHelper(fc, 'P', "python"); -#ifdef SUPPORT_PLD_DEPFILTER - if (fc->findreq) -#endif /* SUPPORT_PLD_DEPFILTER */ #ifdef NOTYET if (is_executable) #endif xx = rpmfcHelper(fc, 'R', "python"); } else if (fc->fcolor->vals[fc->ix] & RPMFC_LIBTOOL) { -#ifdef SUPPORT_PLD_DEPFILTER - if (fc->findprov) -#endif /* SUPPORT_PLD_DEPFILTER */ xx = rpmfcHelper(fc, 'P', "libtool"); -#ifdef SUPPORT_PLD_DEPFILTER - if (fc->findreq) -#endif /* SUPPORT_PLD_DEPFILTER */ #ifdef NOTYET if (is_executable) #endif xx = rpmfcHelper(fc, 'R', "libtool"); } else if (fc->fcolor->vals[fc->ix] & RPMFC_PKGCONFIG) { -#ifdef SUPPORT_PLD_DEPFILTER - if (fc->findprov) -#endif /* SUPPORT_PLD_DEPFILTER */ xx = rpmfcHelper(fc, 'P', "pkgconfig"); -#ifdef SUPPORT_PLD_DEPFILTER - if (fc->findreq) -#endif /* SUPPORT_PLD_DEPFILTER */ #ifdef NOTYET if (is_executable) #endif @@ -904,36 +873,18 @@ } else if (fc->fcolor->vals[fc->ix] & RPMFC_BOURNE) { #ifdef NOTYET -#ifdef SUPPORT_PLD_DEPFILTER - if (fc->findprov) -#endif /* SUPPORT_PLD_DEPFILTER */ xx = rpmfcHelper(fc, 'P', "executable"); #endif -#ifdef SUPPORT_PLD_DEPFILTER - if (fc->findreq) -#endif /* SUPPORT_PLD_DEPFILTER */ if (is_executable) xx = rpmfcHelper(fc, 'R', "executable"); } else if (fc->fcolor->vals[fc->ix] & RPMFC_PHP) { -#ifdef SUPPORT_PLD_DEPFILTER - if (fc->findprov) -#endif /* SUPPORT_PLD_DEPFILTER */ xx = rpmfcHelper(fc, 'P', "php"); -#ifdef SUPPORT_PLD_DEPFILTER - if (fc->findreq) -#endif /* SUPPORT_PLD_DEPFILTER */ if (is_executable) xx = rpmfcHelper(fc, 'R', "php"); } else if (fc->fcolor->vals[fc->ix] & RPMFC_MONO) { -#ifdef SUPPORT_PLD_DEPFILTER - if (fc->findprov) -#endif /* SUPPORT_PLD_DEPFILTER */ xx = rpmfcHelper(fc, 'P', "mono"); -#ifdef SUPPORT_PLD_DEPFILTER - if (fc->findreq) -#endif /* SUPPORT_PLD_DEPFILTER */ if (is_executable) xx = rpmfcHelper(fc, 'R', "mono"); } @@ -962,7 +913,7 @@ break; case RPMTAG_PROVIDENAME: #ifdef SUPPORT_PLD_DEPFILTER - if (fc->findprov + if (!fc->skipProv && !rpmfcMatchRegexps(fc->Pnoauto, fc->Pnoauto_c, ds->N[0], 'P')) #endif /* SUPPORT_PLD_DEPFILTER */ { @@ -976,7 +927,7 @@ break; cas
[CVS] RPM: rpm/lib/ rpmfc.c rpm/tools/ rpmdeps.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Anders F. Björklund Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 15-Mar-2008 09:47:26 Branch: HEAD Handle: 2008031508472501 Modified files: rpm/lib rpmfc.c rpm/tools rpmdeps.c Log: fix more printf warnings Summary: RevisionChanges Path 1.48+2 -2 rpm/lib/rpmfc.c 2.15+1 -1 rpm/tools/rpmdeps.c patch -p0 <<'@@ .' Index: rpm/lib/rpmfc.c $ cvs diff -u -r1.47 -r1.48 rpmfc.c --- rpm/lib/rpmfc.c 12 Mar 2008 18:11:08 - 1.47 +++ rpm/lib/rpmfc.c 15 Mar 2008 08:47:25 - 1.48 @@ -572,7 +572,7 @@ assert(fx < fc->fcolor->nvals); fcolor = fc->fcolor->vals[fx]; - fprintf(fp, "%3d %s", fx, fc->fn[fx]); + fprintf(fp, "%3d %s", (int)fx, fc->fn[fx]); if (fcolor != RPMFC_BLACK) fprintf(fp, "\t0x%x", fc->fcolor->vals[fx]); else @@ -1645,7 +1645,7 @@ if (fc != NULL && _rpmfc_debug) { char msg[BUFSIZ]; -sprintf(msg, "final: files %u cdict[%d] %u%% ddictx[%d]", fc->nfiles, argvCount(fc->cdict), ((100 * fc->fknown)/fc->nfiles), argiCount(fc->ddictx)); +sprintf(msg, "final: files %u cdict[%d] %u%% ddictx[%d]", (unsigned int)fc->nfiles, argvCount(fc->cdict), (unsigned int)((100 * fc->fknown)/fc->nfiles), argiCount(fc->ddictx)); rpmfcPrint(msg, fc, NULL); } @@ . patch -p0 <<'@@ .' Index: rpm/tools/rpmdeps.c $ cvs diff -u -r2.14 -r2.15 rpmdeps.c --- rpm/tools/rpmdeps.c 7 Oct 2007 16:57:00 - 2.14 +++ rpm/tools/rpmdeps.c 15 Mar 2008 08:47:26 - 2.15 @@ -271,7 +271,7 @@ xx = rpmfcApply(fc); if (_rpmfc_debug) { -sprintf(buf, "final: files %d cdict[%d] %d%% ddictx[%d]", fc->nfiles, argvCount(fc->cdict), ((100 * fc->fknown)/fc->nfiles), argiCount(fc->ddictx)); +sprintf(buf, "final: files %d cdict[%d] %d%% ddictx[%d]", (int)fc->nfiles, argvCount(fc->cdict), (int)((100 * fc->fknown)/fc->nfiles), argiCount(fc->ddictx)); rpmfcPrint(buf, fc, NULL); } if (print_provides > 0) print_provides = 0; @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ rpmfc.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-Sep-2007 22:37:17 Branch: HEAD Handle: 2007092221371600 Modified files: rpm/lib rpmfc.c Log: remove duplicate call. Summary: RevisionChanges Path 1.16+1 -3 rpm/lib/rpmfc.c patch -p0 <<'@@ .' Index: rpm/lib/rpmfc.c $ cvs diff -u -r1.15 -r1.16 rpmfc.c --- rpm/lib/rpmfc.c 1 Aug 2007 19:35:04 - 1.15 +++ rpm/lib/rpmfc.c 22 Sep 2007 20:37:16 - 1.16 @@ -997,6 +997,7 @@ if (magicfile == NULL || *magicfile == '\0') magicfile = _free(magicfile); mg = rpmmgNew(magicfile, 0); +assert(mg); /* XXX figger a proper return path. */ fc->nfiles = argvCount(argv); @@ -1008,9 +1009,6 @@ xx = argvAdd(&fc->cdict, ""); xx = argvAdd(&fc->cdict, "directory"); -mg = rpmmgNew(magicfile, 0); -assert(mg); /* XXX figger a proper return path. */ - for (fc->ix = 0; fc->ix < fc->nfiles; fc->ix++) { const char * ftype; int freeftype; @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ rpmfc.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-Jul-2007 03:13:40 Branch: HEAD Handle: 2007072202134000 Modified files: rpm/lib rpmfc.c Log: revert 1.11 Summary: RevisionChanges Path 1.12+1 -1 rpm/lib/rpmfc.c patch -p0 <<'@@ .' Index: rpm/lib/rpmfc.c $ cvs diff -u -r1.11 -r1.12 rpmfc.c --- rpm/lib/rpmfc.c 20 Jul 2007 16:23:36 - 1.11 +++ rpm/lib/rpmfc.c 22 Jul 2007 01:13:40 - 1.12 @@ -1511,7 +1511,7 @@ {const char * buildRootURL; const char * buildRoot; - buildRootURL = rpmGenPath(spec->rootURL, "%{?buildroot/}", NULL); + buildRootURL = rpmGenPath(spec->rootURL, "%{?buildroot}", NULL); (void) urlPath(buildRootURL, &buildRoot); if (buildRoot && !strcmp(buildRoot, "/")) buildRoot = NULL; fc->brlen = (buildRoot ? strlen(buildRoot) : 0); @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ rpmfc.c transaction.c rpm/rpmdb/ legacy.c sqlite.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: 10-Jul-2007 19:18:13 Branch: HEAD Handle: 2007071018181201 Modified files: rpm/lib rpmfc.c transaction.c rpm/rpmdb legacy.c sqlite.c rpm/rpmio rpmhash.c rpmhash.h Log: rpmfc.c: insure that ftype is initialized (always ways, gcc is dense). rpmfc.c: indentation changes for UNSPECIFIED -magicfile behavior. transaction.c: fix void *** dereference. legacy.c: fix void ** dereference. sqlite.c: insure that umask is initialized. rpmhash.[ch]: take void ** references out of the API. Summary: RevisionChanges Path 1.7 +6 -9 rpm/lib/rpmfc.c 1.325 +1 -2 rpm/lib/transaction.c 1.30+1 -1 rpm/rpmdb/legacy.c 1.8 +1 -1 rpm/rpmdb/sqlite.c 1.3 +4 -4 rpm/rpmio/rpmhash.c 1.3 +7 -7 rpm/rpmio/rpmhash.h patch -p0 <<'@@ .' Index: rpm/lib/rpmfc.c $ cvs diff -u -r1.6 -r1.7 rpmfc.c --- rpm/lib/rpmfc.c 3 Jul 2007 17:49:14 - 1.6 +++ rpm/lib/rpmfc.c 10 Jul 2007 17:18:12 - 1.7 @@ -1034,6 +1034,7 @@ int_16 mode = (fmode ? fmode[fc->ix] : 0); int urltype; + ftype = ""; urltype = urlPath(argv[fc->ix], &s); assert(s != NULL && *s == '/'); slen = strlen(s); @@ -1085,20 +1086,17 @@ /* XXX skip all files in /dev/ which are (or should be) %dev dummies. */ else if (slen >= fc->brlen+sizeof("/dev/") && !strncmp(s+fc->brlen, "/dev/", sizeof("/dev/")-1)) ftype = ""; - else #ifdef HAVE_MAGIC_H - if (magicfile) { + else if (magicfile) { ftype = magic_file(ms, s); - if (ftype == NULL) { - xx = RPMERR_EXEC; - rpmError(xx, _("magic_file(ms, \"%s\") failed: mode %06o %s\n"), + if (ftype == NULL) { + xx = RPMERR_EXEC; + rpmError(xx, _("magic_file(ms, \"%s\") failed: mode %06o %s\n"), s, mode, magic_error(ms)); assert(ftype != NULL); /* XXX figger a proper return path. */ + } } - } -#else - ftype = ""; #endif /[EMAIL PROTECTED]@*/ break; } @@ -1147,7 +1145,6 @@ #endif #ifdef HAVE_MAGIC_H -exit: magicfile = _free(magicfile); #endif @@ . patch -p0 <<'@@ .' Index: rpm/lib/transaction.c $ cvs diff -u -r1.324 -r1.325 transaction.c --- rpm/lib/transaction.c 19 Jun 2007 02:32:42 - 1.324 +++ rpm/lib/transaction.c 10 Jul 2007 17:18:12 - 1.325 @@ -435,8 +435,7 @@ * will be installed and removed so the records for an overlapped * files will be sorted in exactly the same order. */ - (void) htGetEntry(ts->ht, fiFps, - (const void ***) &recs, &numRecs, NULL); + (void) htGetEntry(ts->ht, fiFps, &recs, &numRecs, NULL); /* * If this package is being added, look only at other packages @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/legacy.c $ cvs diff -u -r1.29 -r1.30 legacy.c --- rpm/rpmdb/legacy.c9 Jul 2007 22:31:57 - 1.29 +++ rpm/rpmdb/legacy.c10 Jul 2007 17:18:12 - 1.30 @@ -203,7 +203,7 @@ ctx = rpmDigestInit(digestalgo, RPMDIGEST_NONE); if (fsize) xx = rpmDigestUpdate(ctx, mapped, fsize); - xx = rpmDigestFinal(ctx, (void **)&dsum, &dlen, asAscii); + xx = rpmDigestFinal(ctx, &dsum, &dlen, asAscii); if (fsize) xx = munmap(mapped, fsize); xx = close(fdno); @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/sqlite.c $ cvs diff -u -r1.7 -r1.8 sqlite.c --- rpm/rpmdb/sqlite.c30 Jun 2007 15:55:06 - 1.7 +++ rpm/rpmdb/sqlite.c10 Jul 2007 17:18:12 - 1.8 @@ -893,7 +893,7 @@ const char * dbfile; const char * dbfname; const char * sql_errcode; -mode_t umask_safed; +mode_t umask_safed = 0002; dbiIndex dbi; SQL_DB * sqldb; size_t len; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmhash.c