The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Feature #1823

pear package type

Added by Martha Greenberg over 5 years ago. Updated 7 months ago.

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

0%

Category:package
Target version:-
Affected Puppet version:0.24.6 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


Description

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

History

#1 Updated by James Turnbull over 5 years ago

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

Tests?

#2 Updated by Uwe Stuehler over 4 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"]

     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

Also available in: Atom PDF