[csw-devel] SF.net SVN: gar:[7273] csw/mgar/pkg/puppet/trunk

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Fri Nov 13 16:56:24 CET 2009


Revision: 7273
          http://gar.svn.sourceforge.net/gar/?rev=7273&view=rev
Author:   wahwah
Date:     2009-11-13 15:56:23 +0000 (Fri, 13 Nov 2009)

Log Message:
-----------
puppet: Using the --single option of pkgutil

Modified Paths:
--------------
    csw/mgar/pkg/puppet/trunk/Makefile
    csw/mgar/pkg/puppet/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/puppet/trunk/files/0002-Using-the-single-option-of-pkgutil.patch

Modified: csw/mgar/pkg/puppet/trunk/Makefile
===================================================================
--- csw/mgar/pkg/puppet/trunk/Makefile	2009-11-13 15:38:21 UTC (rev 7272)
+++ csw/mgar/pkg/puppet/trunk/Makefile	2009-11-13 15:56:23 UTC (rev 7273)
@@ -53,6 +53,7 @@
 INSTALL_SCRIPTS   = puppet
 
 PATCHFILES  = 0001-pkgutil-support.patch
+PATCHFILES += 0002-Using-the-single-option-of-pkgutil.patch
 
 include gar/category.mk
 

Modified: csw/mgar/pkg/puppet/trunk/checksums
===================================================================
--- csw/mgar/pkg/puppet/trunk/checksums	2009-11-13 15:38:21 UTC (rev 7272)
+++ csw/mgar/pkg/puppet/trunk/checksums	2009-11-13 15:56:23 UTC (rev 7273)
@@ -1,5 +1,6 @@
 abaa404420106f9f28e9e1218b4e365b  0001-pkgutil-support.patch
-3b7da4c98895e944262ed684e48e3b08  cswpuppetd
+9c27c0cdca051eae986b56b91ef889ca  0002-Using-the-single-option-of-pkgutil.patch
+db0230ad9c2a8622c7f7e73c10f61dbc  cswpuppetd
 fd5e49b7d2b7d288d5beb224d0cfa855  cswpuppetmasterd
 3ab0d4f9801075bc78b68b766b496fc7  cswusergroup
 288d46dee00acad64d0f3ecc6d8ba6fa  puppet-0.24.8.tgz

Added: csw/mgar/pkg/puppet/trunk/files/0002-Using-the-single-option-of-pkgutil.patch
===================================================================
--- csw/mgar/pkg/puppet/trunk/files/0002-Using-the-single-option-of-pkgutil.patch	                        (rev 0)
+++ csw/mgar/pkg/puppet/trunk/files/0002-Using-the-single-option-of-pkgutil.patch	2009-11-13 15:56:23 UTC (rev 7273)
@@ -0,0 +1,57 @@
+From bf4be0c98f180175dbadeaf3d841bd426b23752e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Maciej=20Blizi=C5=84ski?= <blizinski at google.com>
+Date: Fri, 13 Nov 2009 15:44:24 +0000
+Subject: [PATCH] Using the --single option of pkgutil.
+
+---
+ lib/puppet/provider/package/apt.rb     |    1 +
+ lib/puppet/provider/package/pkgutil.rb |    5 ++++-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/lib/puppet/provider/package/apt.rb b/lib/puppet/provider/package/apt.rb
+index a99ee4c..91e0121 100755
+--- a/lib/puppet/provider/package/apt.rb
++++ b/lib/puppet/provider/package/apt.rb
+@@ -1,3 +1,4 @@
++# vim:set sw=4 ts=4 sts=4:
+ Puppet::Type.type(:package).provide :apt, :parent => :dpkg, :source => :dpkg do
+     # Provide sorting functionality
+     include Puppet::Util::Package
+diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb
+index cde7482..c2489cc 100755
+--- a/lib/puppet/provider/package/pkgutil.rb
++++ b/lib/puppet/provider/package/pkgutil.rb
+@@ -1,4 +1,5 @@
+ # Packaging using pkgutil from http://pkgutil.wikidot.com/
++# vim:set sw=4 ts=4 sts=4:
+ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun do
+     desc "Package management using ``pkgutil`` command on Solaris."
+     pkgutil = "pkgutil"
+@@ -20,6 +21,7 @@ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun d
+         end
+     end
+ 
++    # It's a class method. Returns a list of instances of this class.
+     def self.instances(hash = {})
+         blastlist(hash).collect do |bhash|
+             bhash.delete(:avail)
+@@ -32,6 +34,7 @@ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun d
+         command = ["-c"]
+ 
+         if hash[:justme]
++            command << ["--single"]
+             command << hash[:justme]
+         end
+ 
+@@ -86,7 +89,7 @@ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun d
+         pkgutil "-y", "--install", @resource[:name]
+     end
+ 
+-    # Retrieve the version from the current package file.
++    # What's the latest version of the package available?
+     def latest
+         hash = self.class.blastlist(:justme => @resource[:name])
+         hash[:avail]
+-- 
+1.6.5.1
+


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list