I haven't gone though the C code yet. What I have known so far, cfengine usually uses full path names so I don't think that the pattern would be used in the root folder of the depth search. Concerning your problem, cfengine might try to do exclude_dirs regex with "base/hello/data/cache". It might be a reason that "data/cache" doesn't work, but ".*data/cache".
Also you may try to have directories like; then run cf-agent. - base/hello/data/cache - base/hello/filedata/cache - base/hello/tmpdata/cache - base/hello/testdata/cache If my guesswork is true, neither of them would be copied. Cheers, --Nakarin On Feb 2, 2010, at 1:52 AM, Jean-Noël Rivasseau wrote: > I can confirm that it excludes base/hello/data/cache. So is there a symbol to > use in a exclude_dirs pattern to mean "the root of the depth search" ? > > Also, I really don't understand why you need the .* in front. If someone can > enlighten me... thanks > > Jean-Noel > > On Mon, Feb 1, 2010 at 4:25 PM, Jean-Noël Rivasseau <elva...@gmail.com> wrote: > I tried that and it seems to be working! But, why ?? > > I previously just had exclude_dirs => { "data/cache" }; . Why do you need the > .* in front? Also, I guess this would also exclude base/hello/data/cache, > which I may want... > > Jean-Noel > > > On Mon, Feb 1, 2010 at 4:00 PM, Nakarin Phooripoom <mynameisje...@gmail.com> > wrote: > Maybe this is what you want. > > body depth_search recurse(depth) > { > depth => "$(depth)"; > exclude_dirs => { ".*data/cache" }; > } > > Cheers, > --Nakarin > > On Feb 1, 2010, at 11:46 PM, Jean-Noël Rivasseau wrote: > > > Hi > > > > It seems to me exclude_dirs is not flexible enough, or I dont know how to > > use it properly. > > > > Say I have a base directory I want to copy recursively, base/. Inside base/ > > there is a data subfolder, and inside data cache/. > > > > I dont want to copy the cache directory base/data/cache; however I do want > > to copy a base/other/cache directory for instance. How can I specify pathes > > in the regexps to achieve this kind of things? > > > > It seems to me it is not possible, but I would love to be proved wrong (or, > > unfortunately, confirmed true, in which case I would probably have to use > > rsync then). > > > > Jean-Noel > > _______________________________________________ > > Help-cfengine mailing list > > Help-cfengine@cfengine.org > > https://cfengine.org/mailman/listinfo/help-cfengine _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine