On Fri, 2009-08-07 at 11:42 +0200, Kristof Willaert wrote: > David, > > > Attached is a patch (apply with 'patch -p1 < this.patch' in the toplevel > > dir) that prints some more info - maybe that will shed some light on > > what is happening. > > this is what I get: > > nim > augtool print > FILTER: Aliases > glob(/etc/aliases, pathc=1) = 0 > 0 matches > FILTER: Sudoers > glob(/etc/sudoers, pathc=1) = 0 > 0 matches
This is very strange, especially in the case of /etc/aliases: the above output says that for either it found one file matching the incl pattern, but then discarded it because it matched an excl pattern - which is particularly puzzling in the Aliases case, since there's no excl pattern. Can you try again with the attached patch on top of the one I sent yesterday ? David
>From 1cba8a29f5bd56e68f25c9c29f0f91f9415a75e2 Mon Sep 17 00:00:00 2001 From: David Lutterkort <[email protected]> Date: Fri, 7 Aug 2009 08:48:25 -0700 Subject: [PATCH] * src/transform.c: additional debug printing --- src/transform.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/transform.c b/src/transform.c index 6de62c0..768e545 100644 --- a/src/transform.c +++ b/src/transform.c @@ -144,7 +144,7 @@ static int filter_generate(struct tree *xfm, const char *root, const char *path = pathv[i]; if (strchr(e->value, SEP) == NULL) path = pathbase(path); - if (fnmatch(e->value, path, fnm_flags) == 0) { + if ((r = fnmatch(e->value, path, fnm_flags)) == 0) { free(pathv[i]); pathc -= 1; if (i < pathc) { @@ -153,6 +153,8 @@ static int filter_generate(struct tree *xfm, const char *root, } else { i += 1; } + fprintf(stderr, " fnmatch(%s, %s, pathc=%d) = %d\n", + e->value, path, pathc, r); } } if (REALLOC_N(pathv, pathc) == -1) { -- 1.6.0.6
_______________________________________________ augeas-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/augeas-devel
