Skip to content

Commit 08749cf

Browse files
committed
Fix pecl package name confusion for good, fix jippi#74
1 parent 987586c commit 08749cf

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/puppet/provider/package/pecl.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def self.peclsplit(desc)
6363
version = $2
6464

6565
return {
66-
:name => name,
66+
:name => "pecl-#{name}",
6767
:ensure => version
6868
}
6969
else
@@ -78,8 +78,8 @@ def self.instances
7878
end
7979
end
8080

81-
def name
82-
super.sub('pecl-', '')
81+
def peclname
82+
self.name.sub('pecl-', '')
8383
end
8484

8585
def install(useversion = true)
@@ -90,9 +90,9 @@ def install(useversion = true)
9090
else
9191
if (! @resource.should(:ensure).is_a? Symbol) and useversion
9292
command << '-f'
93-
command << "#{self.name}-#{@resource.should(:ensure)}"
93+
command << "#{self.peclname}-#{@resource.should(:ensure)}"
9494
else
95-
command << self.name
95+
command << self.peclname
9696
end
9797
end
9898

@@ -106,7 +106,7 @@ def install(useversion = true)
106106

107107
def latest
108108
version = ''
109-
command = [command(:peclcmd), "remote-info", self.name]
109+
command = [command(:peclcmd), "remote-info", self.peclname]
110110
list = execute(command).each_line do |set|
111111
if set =~ /^Latest/
112112
version = set.split[1]
@@ -117,11 +117,11 @@ def latest
117117
end
118118

119119
def query
120-
self.class.pecllist(:justme => self.name)
120+
self.class.pecllist(:justme => self.peclname)
121121
end
122122

123123
def uninstall
124-
output = peclcmd "uninstall", self.name
124+
output = peclcmd "uninstall", self.peclname
125125
if output =~ /^uninstall ok/
126126
else
127127
raise Puppet::Error, output

0 commit comments

Comments
 (0)