Issue #4946 has been updated by Markus Roberts.

Status changed from Unreviewed to Accepted
Assignee set to Markus Roberts
Target version set to 2.6.x

There are actually a number of bugs here; notice that the code:

<pre>
    if chained?
      real_left = left.safeevaluate(scope)
      left_dep = left_dep.shift if left_dep.is_a?(Array)
    else
      real_left = left.safeevaluate(scope)
    end
</pre>

Is just another way of writing:

<pre>
    real_left = left.safeevaluate(scope)
    raise "NameError: undefined local variable or method `left_dep'" if chained?
</pre>

----------------------------------------
Bug #4946: Dependency abbreviations incorrectly parsed
http://projects.puppetlabs.com/issues/4946

Author: Hunter Haugen
Status: Accepted
Priority: Normal
Assignee: Markus Roberts
Category: 
Target version: 2.6.x
Affected version: 
Keywords: 
Branch: 


The dependencies before/require in 2.6 can be abbreviated with -> or <-. There 
appears to be a bug with more than one element in a resource block.

These both fail irrespective of whitespace:
<pre>class pkgs {
  package { ["mysql", "httpd"]:
    ensure => present,
  } ->
  service { "httpd":
    ensure => running,
  }
}
include pkgs</pre>
<pre>class pkgs {
  package {
    "mysql": ensure => present;
    "httpd": ensure => present,
  } ->
  service { "httpd":
    ensure => running,
  }
}
include pkgs</pre>
And they fail with this error:
<pre>Could not find resource 'Package[mysql]Package[httpd]' for relationship on 
'Service[httpd]' on node localhost.localdomain</pre>

This succeeds, as expected:
<pre>class pkgs {
  package { ["mysql", "httpd"]:
    ensure => present,
    before => Service["httpd"],
  }
  service { "httpd":
    ensure => running,
  }
}
include pkgs</pre>
Having a single package in the package resource block succeeds with the "->" 
syntax.

CentOS 5.5<br />
Puppet 2.6.1


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to