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

$(this.promiser) not evaluated for exec_program

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.1
    • Component/s: Evaluation
    • Labels:
      None

      Description

      This was already reported as https://cfengine.com/bugtracker/bug_view_advanced_page.php?bug_id=294

      Is is still broken in 3.5.2 and renders exec_command unusable for file_select.

      Here's some example code:

      <pre>
      body common control
      {
      bundlesequence =>

      { "main" }

      ;
      inputs =>

      { "$(sys.workdir)/inputs/lib/cfengine_stdlib.cf", }

      ;
      }

      bundle agent main
      {
      files:
      any::
      "/tmp"
      copy_from => local_cp("$(sys.workdir)/inputs"),
      file_select => by_exec_cmd,
      depth_search => recurse("1"),
      classes => if_repaired("copied_files");

      }

      body file_select by_exec_cmd {
      leaf_name =>

      { ".*\.cf" }

      ;
      exec_program => "/bin/ls $(this.promiser)";
      file_result => "leaf_name.exec_program";
      }
      </pre>

      yields:
      <pre>
      $ /var/cfengine/bin/cf-agent -f $(pwd)/test_this.cf
      /bin/ls: cannot access $(this.promiser): No such file or directory
      /bin/ls: cannot access $(this.promiser): No such file or directory
      [...]
      </pre>

      This is more or less the example from the documentation https://cfengine.com/docs/3.5/reference-promise-types-files.html#exec_program, so please make this work, we need it desparately.

      Thanks,
      Sven

        Attachments

          Release management

            Issue Links

              Activity

                People

                Assignee:
                a10025 Volker Hilsheimer (Inactive)
                Reporter:
                svenxy Sven Hergenhahn
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: