[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. puppet-0.24.5-rc3-1601-gf8c1b08
James Turnbull
james at lovedthanlost.net
Fri Jan 15 09:07:47 UTC 2010
The following commit has been merged in the upstream branch:
commit b96b757f1d091130b06542856c5b5b3a683a8e39
Author: Markus Roberts <Markus at reality.com>
Date: Sat Dec 12 10:56:37 2009 -0800
Fix for #887 (safely setting pager to cat for blastwave)
This is Luke's suggested fix, from the ticket.
diff --git a/lib/puppet/provider/package/blastwave.rb b/lib/puppet/provider/package/blastwave.rb
index a2f86aa..cf2c87b 100755
--- a/lib/puppet/provider/package/blastwave.rb
+++ b/lib/puppet/provider/package/blastwave.rb
@@ -10,8 +10,9 @@ Puppet::Type.type(:package).provide :blastwave, :parent => :sun, :source => :sun
commands :pkgget => pkgget
- # This is so stupid, but then, so is blastwave.
- ENV["PAGER"] = "/usr/bin/cat"
+ def pkgget_with_cat(*args)
+ withenv(:PAGER => "/usr/bin/cat") { pkgget(*args) }
+ end
def self.extended(mod)
unless command(:pkgget) != "pkg-get"
@@ -40,7 +41,7 @@ Puppet::Type.type(:package).provide :blastwave, :parent => :sun, :source => :sun
command << hash[:justme]
end
- output = pkgget command
+ output = pkgget_with_cat command
list = output.split("\n").collect do |line|
next if line =~ /^#/
@@ -88,7 +89,7 @@ Puppet::Type.type(:package).provide :blastwave, :parent => :sun, :source => :sun
end
def install
- pkgget "-f", :install, @resource[:name]
+ pkgget_with_cat "-f", :install, @resource[:name]
end
# Retrieve the version from the current package file.
@@ -107,11 +108,11 @@ Puppet::Type.type(:package).provide :blastwave, :parent => :sun, :source => :sun
# Remove the old package, and install the new one
def update
- pkgget "-f", :upgrade, @resource[:name]
+ pkgget_with_cat "-f", :upgrade, @resource[:name]
end
def uninstall
- pkgget "-f", :remove, @resource[:name]
+ pkgget_with_cat "-f", :remove, @resource[:name]
end
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list