The original blastwave.rb would store "no pkg-get in /usr/sbin /usr/ bin" into @@pkgget if pkg-get is not found in the PATH. The patch below modifies blastwave.rb to store the first matching binary in the user''s PATH, or if not found, check the default location (puppetd''s PATH may not be sane) and if still not present and executable, correctly store as nil. [piper:/opt/csw/lib/ruby] root# cat patch --- site_ruby/1.8/puppet/type/package/blastwave.rb Wed Aug 2 18:14:27 2006 +++ site_ruby/1.8/puppet/type/package/blastwave.rb.rts Wed Aug 2 18:11:07 2006 @@ -1,9 +1,11 @@ module Puppet Puppet.type(:package).newpkgtype(:blastwave, :sun) do - if pkgget = %x{which pkg-get 2>/dev/null}.chomp and pkgget ! = "" - @@pkgget = pkgget + if pkgget = (%x{which pkg-get 2>/dev/null}.chomp).split and pkgget.first != "no" + @@pkgget = pkgget.first else - @@pkgget = nil + if (FileTest.executable?( "/opt/csw/bin/pkg-get" )) then @@pkgget = "/opt/csw/bin/pkg-get" + else @@pkgget = nil + end end # This is so stupid [piper:/opt/csw/lib/ruby] root# patch -p0 -u site_ruby/1.8/puppet/ type/package/blastwave.rb < patch Looks like a unified context diff. done [piper:/opt/csw/lib/ruby] root# Cheers, -- Ryan Schwartz Director of Systems Operations Joyent, Inc. TextDrive, Inc.
you know what, i really do not understand of what you talk. What is this blastware thing ? :) Cordialement, Ghislain ADNET.
ADNET Ghislain wrote:> you know what, i really do not understand of what you talk. What is this > blastware thing ? :)Blastwave is an apt-esque package retrieval and install system for Solaris: http://www.blastwave.org/ It''s not much, but it''s all those poor Solaris people have. -- Progress isn''t made by early risers. It''s made by lazy men trying to find easier ways to do something. --Robert Heinlein --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Ryan Schwartz wrote:> The original blastwave.rb would store "no pkg-get in /usr/sbin /usr/ > bin" into @@pkgget if pkg-get is not found in the PATH. > > The patch below modifies blastwave.rb to store the first matching > binary in the user''s PATH, or if not found, check the default > location (puppetd''s PATH may not be sane) and if still not present > and executable, correctly store as nil.This patch is now basically applied in the implementations branch, so I''ll either be merging it over to the trunk soon (assuming I can get the implementations stuff satisfactorily working) or I''ll just recreate it in the trunk if necessary (unlikely). Thanks. -- I am a kind of paranoiac in reverse. I suspect people of plotting to make me happy. --J. D. Salinger --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com