Issue #1823 has been updated by Uwe Stuehler.

(We tested this provider with version 0.24.5 and 0.25.0.)

The patch below is necessary to notice already installed pear packages from 
non-default channels.

For example:
<pre>
package { PHPUnit:
  provider => pear,
  ensure   => installed,
  source   => "phpunit/PHPUnit"
}
</pre>

<pre>
diff --git a/modules/puppet/plugins/puppet/provider/package/pear.rb 
b/modules/puppet/plugins/puppet/provider/package/pear.rb
index e5d5863..43937f6 100644
--- a/modules/puppet/plugins/puppet/provider/package/pear.rb
+++ b/modules/puppet/plugins/puppet/provider/package/pear.rb
@@ -12,7 +12,7 @@ Puppet::Type.type(:package).provide :pear, :parent => 
Puppet::Provider::Package
   commands :pearcmd => "pear"

   def self.pearlist(hash)
-    command = [command(:pearcmd), "list"]
+    command = [command(:pearcmd), "list", "-a"]

     begin
       list = execute(command).collect do |set|
@@ -53,6 +53,8 @@ Puppet::Type.type(:package).provide :pear, :parent => 
Puppet::Provider::Package
     when /^INSTALLED/: return nil
     when /^=/: return nil
     when /^PACKAGE/: return nil
+    when /^$/: return nil
+    when /^\(no packages installed\)$/: return nil
     when /^(\S+)\s+([.\d]+)\s+\S+\n/
       name = $1
       version = $2
</pre>
----------------------------------------
Feature #1823: pear package type
http://projects.reductivelabs.com/issues/1823

Author: Martha Greenberg
Status: Tests Insufficient
Priority: Normal
Assigned to: Martha Greenberg
Category: package
Target version: 
Affected version: 0.24.6
Keywords: 
Branch: 


New package type for PHP pear packages.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to