diff options
| author | Luke Kanies <luke@madstop.com> | 2008-03-07 12:28:58 -0600 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-03-07 12:28:58 -0600 |
| commit | 9f8bb7e42aeea4670d9292f935529f8db5d57bc5 (patch) | |
| tree | b3b746e516d62d10368d19a197749dd25a54307e /lib/puppet/node | |
| parent | c2b33acd5c1e6fe4021d7609f806b7bd8af834f8 (diff) | |
| parent | e8029cc61a1956263935a0df469cc77b8e80a102 (diff) | |
| download | puppet-9f8bb7e42aeea4670d9292f935529f8db5d57bc5.tar.gz puppet-9f8bb7e42aeea4670d9292f935529f8db5d57bc5.tar.xz puppet-9f8bb7e42aeea4670d9292f935529f8db5d57bc5.zip | |
Merge branch '0.24.x'
Diffstat (limited to 'lib/puppet/node')
| -rw-r--r-- | lib/puppet/node/catalog.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/puppet/node/catalog.rb b/lib/puppet/node/catalog.rb index f885a41ee..ecda472be 100644 --- a/lib/puppet/node/catalog.rb +++ b/lib/puppet/node/catalog.rb @@ -84,6 +84,7 @@ class Puppet::Node::Catalog < Puppet::PGraph # Create an alias for a resource. def alias(resource, name) + #set $1 resource.ref =~ /^(.+)\[/ newref = "%s[%s]" % [$1 || resource.class.name, name] @@ -475,6 +476,15 @@ class Puppet::Node::Catalog < Puppet::PGraph vertices.each do |resource| next if resource.respond_to?(:virtual?) and resource.virtual? + #This is hackity hack for 1094 + #Aliases aren't working in the ral catalog because the current instance of the resource + #has a reference to the catalog being converted. . . So, give it a reference to the new one + #problem solved. . . + if resource.is_a?(Puppet::TransObject) + resource = resource.dup + resource.catalog = result + end + newres = resource.send(convert) # We can't guarantee that resources don't munge their names |
