RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 19-Jan-2009 17:58:59
Branch: HEAD Handle: 2009011916585900
Modified files:
rpm CHANGES
rpm/lib rpmfc.c rpmfc.h
Log:
- jbj: enable the PLD dependency filtering.
Summary:
Revision Changes Path
1.2750 +1 -0 rpm/CHANGES
1.60 +42 -39 rpm/lib/rpmfc.c
1.16 +6 -1 rpm/lib/rpmfc.h
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.2749 -r1.2750 CHANGES
--- rpm/CHANGES 19 Jan 2009 16:00:29 -0000 1.2749
+++ rpm/CHANGES 19 Jan 2009 16:58:59 -0000 1.2750
@@ -1,5 +1,6 @@
5.2a2 -> 5.2a3:
+ - jbj: enable the PLD dependency filtering.
- jbj: PLD: rpm-pld-autodep: add run-time disablers, attempt miRE's instead.
- jbj: PLD: rpm-noexpand: Don't expand macros in %changelog.
- jbj: PLD: rpm-pld-autodep: merge and simplify. entirely dysfunctional ...
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmfc.c
============================================================================
$ cvs diff -u -r1.59 -r1.60 rpmfc.c
--- rpm/lib/rpmfc.c 19 Jan 2009 16:00:29 -0000 1.59
+++ rpm/lib/rpmfc.c 19 Jan 2009 16:58:59 -0000 1.60
@@ -18,8 +18,10 @@
#define _RPMNS_INTERNAL
#include <rpmns.h>
-static int _filter_values = 0;
-static int _filter_execs = 0;
+/*@unchecked@*/
+static int _filter_values = 1;
+/*@unchecked@*/
+static int _filter_execs = 1;
#define _RPMFC_INTERNAL
#include <rpmfc.h>
@@ -31,6 +33,7 @@
#include "debug.h"
/*@access rpmds @*/
+/*@access miRE @*/
/**
*/
@@ -324,8 +327,10 @@
return buf;
};
+/*@null@*/
static void * rpmfcExpandRegexps(const char * str, int * nmirep)
- /*@modifies *nmirep @*/
+ /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
+ /*@modifies *nmirep, rpmGlobalMacroContext, internalState @*/
{
ARGV_t av = NULL;
int ac = 0;
@@ -337,7 +342,7 @@
s = rpmExpand(str, NULL);
if (s) {
- poptParseArgvString(s, &ac, (const char ***)&av);
+ xx = poptParseArgvString(s, &ac, (const char ***)&av);
s = _free(s);
}
if (ac == 0 || av == NULL || *av == NULL)
@@ -348,10 +353,10 @@
/* XXX add REG_NOSUB? better error msg? */
if (xx) {
rpmlog(RPMLOG_NOTICE,
- _("Compilation of regular expresion '%s'"
- " (expanded from '%s') failed. Skipping it.\n"),
+ _("Compilation of pattern '%s'"
+ " (expanded from '%s') failed. Skipping ...\n"),
av[i], str);
- nmire--;
+ nmire--; /* XXX does this actually skip?!? */
}
}
if (nmire == 0)
@@ -366,30 +371,30 @@
static int rpmfcMatchRegexps(void * mires, int nmire,
const char * str, char deptype)
- /*@*/
+ /*@modifies mires @*/
{
miRE mire = mires;
int xx;
int i;
for (i = 0; i < nmire; i++) {
- rpmlog(RPMLOG_DEBUG,
- _("Checking %c: '%s' against _noauto expr. #%i\n"), deptype, str, i);
- xx = mireRegexec(mire + i, str, 0);
- if (xx >= 0) {
- rpmlog(RPMLOG_NOTICE,
- _("Skipping %c: '%s' as it matches _noauto expr. #%i\n"), deptype, str, i);
- return 1;
- }
+ rpmlog(RPMLOG_DEBUG, D_("Checking %c: '%s'\n"), deptype, str);
+ if ((xx = mireRegexec(mire + i, str, 0)) < 0)
+ continue;
+ rpmlog(RPMLOG_NOTICE, _("Skipping %c: '%s'\n"), deptype, str);
+ return 1;
}
return 0;
}
+/*@null@*/
static void * rpmfcFreeRegexps(/*@only@*/ void * mires, int nmire)
/*@modifies mires @*/
{
miRE mire = mires;
+/*@-refcounttrans@*/
return mireFreeAll(mire, nmire);
+/*@=refcounttrans@*/
}
/**
@@ -1006,8 +1011,8 @@
fc->RFmires = rpmfcExpandRegexps("%{__noautoreqfiles}", &fc->RFnmire);
fc->Pmires = rpmfcExpandRegexps("%{__noautoprov}", &fc->Pnmire);
fc->Rmires = rpmfcExpandRegexps("%{__noautoreq}", &fc->Rnmire);
- rpmlog(RPMLOG_DEBUG, _("%i _noautoprov patterns.\n"), fc->Pnmire);
- rpmlog(RPMLOG_DEBUG, _("%i _noautoreq patterns.\n"), fc->Rnmire);
+ rpmlog(RPMLOG_DEBUG, D_("%i _noautoprov patterns.\n"), fc->Pnmire);
+ rpmlog(RPMLOG_DEBUG, D_("%i _noautoreq patterns.\n"), fc->Rnmire);
}
/* Make sure something didn't go wrong previously! */
@@ -1033,32 +1038,30 @@
if (!(fc->fcolor->vals[fc->ix] & fcat->colormask))
/*@innercontinue@*/ continue;
- if (_filter_execs) { /* XXX fix indentation */
- fc->skipProv = skipProv;
- fc->skipReq = skipReq;
- for (j = 0, mire = fc->PFmires; j < fc->PFnmire; j++) {
- fn = fc->fn[fc->ix] + fc->brlen;
- xx = mireRegexec(mire + j, fn, 0);
- if (xx >= 0) {
- rpmlog(RPMLOG_NOTICE, _("skipping %s provides detection"
- " (matches PFmires pattern #%i)\n"),
- fc->fn[fc->ix], j);
+ if (_filter_execs) {
+ fc->skipProv = skipProv;
+ fc->skipReq = skipReq;
+ if ((mire = fc->PFmires) != NULL)
+ for (j = 0; j < fc->PFnmire; j++, mire++) {
+ fn = fc->fn[fc->ix] + fc->brlen;
+ if ((xx = mireRegexec(mire, fn, 0)) < 0)
+ /*@innercontinue@*/ continue;
+ rpmlog(RPMLOG_NOTICE, _("skipping %s provides detection\n"),
+ fn);
fc->skipProv = 1;
- break;
+ /*@innerbreak@*/ break;
}
- }
- for (j = 0, mire = fc->RFmires; j < fc->RFnmire; j++) {
- fn = fc->fn[fc->ix] + fc->brlen;
- xx = mireRegexec(mire + j, fn, 0);
- if (xx >= 0) {
- rpmlog(RPMLOG_NOTICE, _("skipping %s requires detection"
- " (matches RFmires pattern #%i)\n"),
- fc->fn[fc->ix], j);
+ if ((mire = fc->RFmires) != NULL)
+ for (j = 0; j < fc->RFnmire; j++, mire++) {
+ fn = fc->fn[fc->ix] + fc->brlen;
+ if ((xx = mireRegexec(mire, fn, 0)) < 0)
+ /*@innercontinue@*/ continue;
+ rpmlog(RPMLOG_NOTICE, _("skipping %s requires detection\n"),
+ fn);
fc->skipReq = 1;
- break;
+ /*@innerbreak@*/ break;
}
}
- }
xx = (*fcat->func) (fc);
}
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmfc.h
============================================================================
$ cvs diff -u -r1.15 -r1.16 rpmfc.h
--- rpm/lib/rpmfc.h 19 Jan 2009 16:00:29 -0000 1.15
+++ rpm/lib/rpmfc.h 19 Jan 2009 16:58:59 -0000 1.16
@@ -98,12 +98,16 @@
rpmiob iob_python; /*!< concatenated list of python colored files. */
rpmiob iob_php; /*!< concatenated list of php colored files. */
+/*@null@*/
void * Pmires; /*!< Filter patterns from %{__noautoprov} */
int Pnmire;
+/*@null@*/
void * PFmires; /*!< Filter patterns from %{__noautoprov} */
int PFnmire;
+/*@null@*/
void * Rmires; /*!< Filter patterns from %{__noautoreq} */
int Rnmire;
+/*@null@*/
void * RFmires; /*!< Filter patterns from %{__noautoreqfile} */
int RFnmire;
@@ -199,7 +203,8 @@
*/
/*@-exportlocal@*/
rpmRC rpmfcApply(rpmfc fc)
- /*@modifies fc @*/;
+ /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
+ /*@modifies fc, rpmGlobalMacroContext, internalState @*/;
/*@=exportlocal@*/
/**
@@ .
Received on Mon Jan 19 17:58:59 2009