Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-808

edit_template incorrectly deletes lines

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.0
    • Labels:
      None

      Description

      Starting with 3.4.1 and continuing through 3.5.1 blank lines are removed from edit templates.

      <pre>
      body common control
      {

      bundlesequence => {
      "main",
      };

      inputs =>

      { "cfengine_stdlib.cf", }; } bundle agent main { methods: "any" usebundle => test; }

      bundle agent test

      { files: "/root/inputs/file.txt" edit_template => "/root/inputs/file.template", edit_defaults => no_backup, create => "true"; }

      </pre>

      <pre>

      1. cat file.template
        AAAAAAAA

      BBBBBBBB

      CCCCCCCC
      CCCCCCCC
      CCCCCCCC

      DDDDDDDD

      1. cf-agent -KIf ./edit_template_lines.cf
        2013-07-17T14:21:32-0500 info: /main/methods/'any'/test/files/'/root/inputs/file.txt': Created file '/root/inputs/file.txt', mode 0600
        2013-07-17T14:21:32-0500 info: /main/methods/'any'/test/files/'/root/inputs/file.txt': Edit file '/root/inputs/file.txt'
      1. cat file.txt
        AAAAAAAA

      BBBBBBBB
      CCCCCCCC
      DDDDDDDD
      </pre>

      The empty lines are part of the template file and should be preserved by cfengine. Instead, cfengine deletes some empty lines while keeping others.

      Duplicate lines are incorrectly deleted.

      These problems have been known for many months and yet still have not been fixed.

      Very disappointing. Why can't we seem to get issues fixed that should have been caught during qa in the first instance?

        Attachments

          Activity

            People

            • Assignee:
              a10025 Volker Hilsheimer (Inactive)
              Reporter:
              ringersoll Bob Ingersoll
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: