[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.7-1-98-gf19c0e5

James Turnbull james at lovedthanlost.net
Wed Apr 8 21:48:14 UTC 2009


The following commit has been merged in the master branch:
commit ab847568aabff28450e6bd5280c98c108da0b1f5
Author: James Turnbull <james at lovedthanlost.net>
Date:   Sat Feb 14 23:26:12 2009 +1100

    Cleaned up variable names to be more sane, clarified error messages and fixed incorrect use of 'value' variable rather than 'member'.

diff --git a/CHANGELOG b/CHANGELOG
index f84c69a..187e36c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,7 @@
 0.24.8
+    Fixed #1956 - Cleaned up variable names to be more sane, clarified error messages 
+    and fixed incorrect use of 'value' variable rather than 'member'.
+    
     Fixed #1831 - Added sprintf function
 
     Fixed #1830 - Added regsubst function
diff --git a/lib/puppet/provider/nameservice/directoryservice.rb b/lib/puppet/provider/nameservice/directoryservice.rb
index cb9df2c..42c52f0 100644
--- a/lib/puppet/provider/nameservice/directoryservice.rb
+++ b/lib/puppet/provider/nameservice/directoryservice.rb
@@ -457,25 +457,25 @@ class DirectoryService < Puppet::Provider::NameService
     
     def remove_unwanted_members(current_members, new_members)
         current_members.each do |member|
-            if not value.include?(member)
+            if not new_members.include?(member)
                 cmd = [:dseditgroup, "-o", "edit", "-n", ".", "-d", member, @resource[:name]]
                 begin
                      execute(cmd)
                 rescue Puppet::ExecutionFailure => detail
-                     raise Puppet::Error, "Could not set %s on %s[%s]: %s" % [param, @resource.class.name, @resource.name, detail]
+                     raise Puppet::Error, "Could not remove %s from group: %s, %s" % [member, @resource.name, detail]
                 end
              end
          end
     end
     
     def add_members(current_members, new_members)
-        new_members.each do |user|
-           if current_members.nil? or not current_members.include?(user)
-               cmd = [:dseditgroup, "-o", "edit", "-n", ".", "-a", user, @resource[:name]]
+        new_members.each do |new_member|
+           if current_members.nil? or not current_members.include?(new_member)
+               cmd = [:dseditgroup, "-o", "edit", "-n", ".", "-a", new_member, @resource[:name]]
                begin
                     execute(cmd)
                rescue Puppet::ExecutionFailure => detail
-                    raise Puppet::Error, "Could not set %s on %s[%s]: %s" % [param, @resource.class.name, @resource.name, detail]
+                    raise Puppet::Error, "Could not add %s to group: %s, %s" % [new_member, @resource.name, detail]
                end
            end
         end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list