Hi Beto I believe you are correct - file_select only has meaning for copy_from promises. Actually, more accurately it works for any promises which support depth_search. It turns out that edit_line in *not* compatible with depth_search, you will get these errors if you try: !! Recursive depth_searches are not compatible with general file editing
And therefore, edit_lines in not compatible with file_select. I am not sure if this is a bug per say - it appears the original intent of edit_lines was that the promise had to evaluate to a specific file, i.e. no recursive searching would be performed. You can still use regexes to apply edit_lines to multiple files: "/a/b/c/(foo|bar).editme" edit_line => ... I think the best thing would be to raise a feature request, maybe along the same lines as mine, that allows for edit_line promises to be applied to files that are evaluated as the result of a recursive depth_search/file_select - with or without copy_from. Cheers On Tue, Jul 27, 2010 at 1:58 AM, <no-re...@cfengine.com> wrote: > Forum: Cfengine Help > Subject: Re: Edit selected files > Author: Beto > Link to topic: https://cfengine.com/forum/read.php?3,17747,17786#msg-17786 > > Michael, > > I noticed your feature request and I think it would address my requirement > also. > > It is interesting that, in your case, the file_select does cause appropriate > files to get selected, evidently because it is used with a promise that > contains a copy_from. In my testing with 3.0.5p1 the file_select seems > completely ignored when only an edit_line promise is coded (i.e., no > copy_from). > > I'm curious about the specific version of cfengine you are using. > > _______________________________________________ > 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