example42 / puppet-php

A puppet module for php. According to Example42 NextGen spec.
Other
45 stars 62 forks source link

iconv causes exec unless to always return 0 #78

Closed mike-lerch closed 9 years ago

mike-lerch commented 9 years ago

The pipe to iconv causes the unless statement to always return 0, which means the pear package is not being installed.

Example of the issue:

Mainfest:

php::pear::module { "Net_GeoIP": use_package => 'no' }

Testing:

server:~ # pear info pear.php.net/Net_GeoIP | iconv -c
No information found for `pear.php.net/Net_GeoIP'
server:~ # echo $?
0
server:~ # pear info pear.php.net/Net_GeoIP
No information found for `pear.php.net/Net_GeoIP'
server:~ # echo $?
1

Before this change: Net_GeoIP is never installed After this change: Net_GeoIP is installed

OS:

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:    14.04
Codename:   trusty