[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

test branch puppet-dev at googlegroups.com
Wed Jul 14 10:30:25 UTC 2010


The following commit has been merged in the upstream branch:
commit deff92d2bb830179fd68c42c02b193055b9b57be
Author: Rein Henrichs <reinh at reinh.com>
Date:   Tue Mar 30 17:10:44 2010 -0700

    Find both bin and sbin usage docs, fail gracefully

diff --git a/lib/puppet/application.rb b/lib/puppet/application.rb
index 0b8e3d9..8597bd6 100644
--- a/lib/puppet/application.rb
+++ b/lib/puppet/application.rb
@@ -89,7 +89,7 @@ require 'optparse'
 class Puppet::Application
     include Puppet::Util
 
-    SBINDIR = File.expand_path(File.dirname(__FILE__)) + '/../../sbin'
+    BINDIRS = File.expand_path(File.dirname(__FILE__)) + '/../../{sbin,bin}'
 
     @@applications = {}
     def self.applications; @@applications end
@@ -299,14 +299,17 @@ class Puppet::Application
             # RH:FIXME: My goodness, this is ugly.
             ::RDoc.const_set("PuppetSourceFile", @name)
             def (::RDoc).caller
-                file = `grep -l 'Puppet::Application\\[:#{::RDoc::PuppetSourceFile}\\]' #{SBINDIR}/*`.chomp
-                super << "#{file}:0"
+                docfile = `grep -l 'Puppet::Application\\[:#{::RDoc::PuppetSourceFile}\\]' #{BINDIRS}/*`.chomp
+                super << "#{docfile}:0"
             end
             ::RDoc::usage && exit
         else
             puts "No help available unless you have RDoc::usage installed"
             exit
         end
+    rescue Errno::ENOENT
+        puts "No help available for puppet #@name"
+        exit
     end
 
     private

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list