The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Feature #1823

pear package type

Added by Martha Greenberg over 7 years ago. Updated over 2 years ago.

Status:Tests InsufficientStart date:12/15/2008
Priority:NormalDue date:
Assignee:Martha Greenberg% Done:


Target version:-
Affected Puppet version:0.24.6 Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:


New package type for PHP pear packages.

pear.rb Magnifier (2.53 KB) Martha Greenberg, 12/15/2008 10:17 pm

Related issues

Related to Puppet - Feature #2926: pecl package provider Tests Insufficient 12/14/2009


#1 Updated by James Turnbull over 7 years ago

  • Category set to package
  • Status changed from Unreviewed to Tests Insufficient
  • Assignee set to Martha Greenberg


#2 Updated by Uwe Stuehler over 6 years ago

(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:

package { PHPUnit:
  provider => pear,
  ensure   => installed,
  source   => "phpunit/PHPUnit"
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"]

       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

Also available in: Atom PDF