3.0.1a3: Can edit_line be used multiple times in the same files promise?

Jim Wight <[email protected]> Tue, 20 Jan 2009 15:53:02 +0000
Newsgroups gmane.comp.sysutils.cfengine.bugs
Message-ID <EMEW-l0JFr307264516d6dda2bde5d3b3b9f07312bb-4975F35E.1030703@ncl.ac.uk>
Can edit_line be used multiple times in the same files promise?

Given the encouragement in the documentaion to create reusable templates, I 
expected it to be the case. However, given this input:

   body common control
   {
   bundlesequence => { "edit" };
   }

   bundle agent edit
   {
   files:
      "/tmp/editfile"
         create => "true",
         edit_defaults => EmptyFile,
         edit_line => InsertLine("Hello World"),
         edit_line => InsertLine("Goodbye World");
   }

   body edit_defaults EmptyFile
   {
   empty_file_before_editing => "true";
   }

   bundle edit_line InsertLine(line)
   {
   insert_lines:
      "$(line)";
   }

cf-agent reports:

cf3     .........................................................
cf3     Promise: /tmp/editfile
cf3     .........................................................
cf3
cf3 Build file model from a blank slate (emptying)
cf3 Inconsistent edit_line constraints break this promise
cf3  -> Handling file edits in edit_line bundle InsertLine
cf3
cf3       * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
cf3        BUNDLE InsertLine( {'Goodbye World'} )
cf3       * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

and only inserts the second of the two lines (NB I know that both lines could 
be inserted via a single call of InsertLine with a multi-line string).

I don't understand what 'Inconsistent edit_line constraints break this promise' 
is telling me.

Jim