summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2017-05-27 19:32:34 -0400
committerBrian Evans <grknight@gentoo.org>2017-05-27 19:32:34 -0400
commit5bd41632a6596ad6a8974eee4caa38b9dc2b7dc5 (patch)
treee20aeabd6937b799ae3156d81c9d3a2a5127ae18 /eclass/php-pear-r2.eclass
parentdev-php/mockery: Drop old revision (diff)
downloadgentoo-5bd41632a6596ad6a8974eee4caa38b9dc2b7dc5.tar.gz
gentoo-5bd41632a6596ad6a8974eee4caa38b9dc2b7dc5.tar.bz2
gentoo-5bd41632a6596ad6a8974eee4caa38b9dc2b7dc5.zip
php-pear-r2.eclass: Fix inverted test and bad variable reference
The channel test inadvertantly tested for success rather than failure Now the command is always run and the return value is checked. A reference to PEAR_PN was left over when it should be PEAR_P
Diffstat (limited to 'eclass/php-pear-r2.eclass')
-rw-r--r--eclass/php-pear-r2.eclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/eclass/php-pear-r2.eclass b/eclass/php-pear-r2.eclass
index 48ff30355f9d..dad075686bf3 100644
--- a/eclass/php-pear-r2.eclass
+++ b/eclass/php-pear-r2.eclass
@@ -97,9 +97,10 @@ php-pear-r2_src_install() {
php-pear-r2_pkg_postinst() {
# Add unknown channels
if [[ -f "${EROOT}usr/share/php/.packagexml/${PEAR_P}-channel.xml" ]] ; then
- if "${EROOT}usr/bin/peardev" channel-info "${PHP_PEAR_DOMAIN}" &> /dev/null; then
+ "${EROOT}usr/bin/peardev" channel-info "${PHP_PEAR_DOMAIN}" &> /dev/null
+ if [[ $? -ne 0 ]]; then
"${EROOT}usr/bin/peardev" channel-add \
- "${EROOT}usr/share/php/.packagexml/${PEAR_PN}-channel.xml" \
+ "${EROOT}usr/share/php/.packagexml/${PEAR_P}-channel.xml" \
|| einfo "Ignore any errors about existing channels"
fi
fi