[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.6-1-356-g5718585

James Turnbull james at lovedthanlost.net
Fri Jan 23 14:20:45 UTC 2009


The following commit has been merged in the master branch:
commit 13069eca1a3e2b08f5201462021d83e2e0a81018
Author: Daniel Pittman <daniel at rimspace.net>
Date:   Tue Jul 29 15:52:23 2008 +1000

    Ensure that we consistently use either string #{} interpolation or String.%
    interpolation, not both, to avoid issues where a #{} interpolated value
    contains a % character.
    
    Signed-off-by: Daniel Pittman <daniel at rimspace.net>

diff --git a/lib/puppet/indirector/facts/facter.rb b/lib/puppet/indirector/facts/facter.rb
index 465d90c..6ed89da 100644
--- a/lib/puppet/indirector/facts/facter.rb
+++ b/lib/puppet/indirector/facts/facter.rb
@@ -12,12 +12,13 @@ class Puppet::Node::Facts::Facter < Puppet::Indirector::Code
         Dir.entries(dir).find_all { |e| e =~ /\.rb$/ }.each do |file|
             fqfile = ::File.join(dir, file)
             begin
-                Puppet.info "Loading #{type} %s" % ::File.basename(file.sub(".rb",''))
+                Puppet.info "Loading %s %s" % 
+                    [type, ::File.basename(file.sub(".rb",''))]
                 Timeout::timeout(self.timeout) do
                     load fqfile
                 end
             rescue => detail
-                Puppet.warning "Could not load #{type} %s: %s" % [fqfile, detail]
+                Puppet.warning "Could not load %s %s: %s" % [type, fqfile, detail]
             end
         end
     end
diff --git a/lib/puppet/metatype/metaparams.rb b/lib/puppet/metatype/metaparams.rb
index edd5941..df96733 100644
--- a/lib/puppet/metatype/metaparams.rb
+++ b/lib/puppet/metatype/metaparams.rb
@@ -258,7 +258,8 @@ class Puppet::Type
             @value.each do |value|
                 unless @resource.catalog.resource(*value)
                     description = self.class.direction == :in ? "dependency" : "dependent"
-                    fail Puppet::Error, "Could not find #{description} %s[%s] for %s" % [value[0].to_s.capitalize, value[1], resource.ref]
+                    fail Puppet::Error, "Could not find %s %s[%s] for %s" % 
+                        [description, value[0].to_s.capitalize, value[1], resource.ref]
                 end
             end
         end
diff --git a/lib/puppet/network/client/master.rb b/lib/puppet/network/client/master.rb
index 2da6cf8..6f8e277 100644
--- a/lib/puppet/network/client/master.rb
+++ b/lib/puppet/network/client/master.rb
@@ -338,7 +338,7 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
             if Puppet[:debug]
                 puts detail.backtrace
             end
-            Puppet.err "Could not retrieve #{args[:name]}s: %s" % detail
+            Puppet.err "Could not retrieve %ss: %s" % [args[:name], detail]
         end
 
         # Now clean up after ourselves
@@ -389,12 +389,13 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
         Dir.entries(dir).find_all { |e| e =~ /\.rb$/ }.each do |file|
             fqfile = ::File.join(dir, file)
             begin
-                Puppet.info "Loading #{type} %s" % ::File.basename(file.sub(".rb",''))
+                Puppet.info "Loading %s %s" % 
+                    [type, ::File.basename(file.sub(".rb",''))]
                 Timeout::timeout(self.timeout) do
                     load fqfile
                 end
             rescue => detail
-                Puppet.warning "Could not load #{type} %s: %s" % [fqfile, detail]
+                Puppet.warning "Could not load %s %s: %s" % [type, fqfile, detail]
             end
         end
     end
diff --git a/lib/puppet/reports/rrdgraph.rb b/lib/puppet/reports/rrdgraph.rb
index 03d8a5b..5889750 100644
--- a/lib/puppet/reports/rrdgraph.rb
+++ b/lib/puppet/reports/rrdgraph.rb
@@ -90,8 +90,9 @@ Puppet::Reports.register_report(:rrdgraph) do
             of.puts "<html><head><title>Report graphs for %s</title></head><body>" %
                 host
             files.each do |file|
-                of.puts "<a href='#{File.basename(file)}'>%s</a><br/>" %
-                    File.basename(file).sub(".html",'').capitalize
+                of.puts "<a href='%s'>%s</a><br/>" %
+                    [File.basename(file),
+                     File.basename(file).sub(".html",'').capitalize]
             end
             of.puts "</body></html>"
         end
diff --git a/lib/puppet/transportable.rb b/lib/puppet/transportable.rb
index 3ad084b..d203b59 100644
--- a/lib/puppet/transportable.rb
+++ b/lib/puppet/transportable.rb
@@ -65,13 +65,16 @@ module Puppet
         end
 
         def to_manifest
-            "#{self.type.to_s} { \'#{self.name}\':\n%s\n}" % @params.collect { |p, v|
-                if v.is_a? Array
-                    "    #{p} => [\'#{v.join("','")}\']"
-                else
-                    "    #{p} => \'#{v}\'"
-                end
-            }.join(",\n")
+            "%s { '%s':\n%s\n}" % 
+                [self.type.to_s, self.name,
+                 @params.collect { |p, v|
+                     if v.is_a? Array
+                         "    #{p} => [\'#{v.join("','")}\']"
+                     else
+                         "    #{p} => \'#{v}\'"
+                     end
+                 }.join(",\n")
+                ]
         end
 
         def to_yaml_properties
diff --git a/lib/puppet/util/ldap/manager.rb b/lib/puppet/util/ldap/manager.rb
index 9761fc7..8d44419 100644
--- a/lib/puppet/util/ldap/manager.rb
+++ b/lib/puppet/util/ldap/manager.rb
@@ -80,7 +80,7 @@ class Puppet::Util::Ldap::Manager
 
     # Calculate the dn for a given resource.
     def dn(name)
-        ["#{rdn.to_s}=%s" % name, base].join(",")
+        ["%s=%s" % [rdn, name], base].join(",")
     end
 
     # Convert an ldap-style entry hash to a provider-style hash.

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list