summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2018-11-01 21:01:52 -0400
committerBrian Evans <grknight@gentoo.org>2018-11-01 21:01:52 -0400
commit6e7ac37bdc8927378fd9e1f3221119913064e99b (patch)
treebaff0c68d5793461ff023f0f1f09cabaddfd83a4 /eclass/php-pear-r2.eclass
parentmail-client/thunderbird-bin: fix Manifest (diff)
downloadgentoo-6e7ac37bdc8927378fd9e1f3221119913064e99b.tar.gz
gentoo-6e7ac37bdc8927378fd9e1f3221119913064e99b.tar.bz2
gentoo-6e7ac37bdc8927378fd9e1f3221119913064e99b.zip
eclass: php-pear-r2 - Fix up EROOT to be valid for both EAPI
Thanks to [Arfrever] for noticing Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'eclass/php-pear-r2.eclass')
-rw-r--r--eclass/php-pear-r2.eclass16
1 files changed, 8 insertions, 8 deletions
diff --git a/eclass/php-pear-r2.eclass b/eclass/php-pear-r2.eclass
index 26006cbb5f2f..e4197522b162 100644
--- a/eclass/php-pear-r2.eclass
+++ b/eclass/php-pear-r2.eclass
@@ -100,20 +100,20 @@ php-pear-r2_src_install() {
# Register package with the local PEAR database.
php-pear-r2_pkg_postinst() {
# Add unknown channels
- if [[ -f "${EROOT}usr/share/php/.packagexml/${PEAR_P}-channel.xml" ]] ; then
- "${EROOT}usr/bin/peardev" channel-info "${PHP_PEAR_DOMAIN}" &> /dev/null
+ if [[ -f "${EROOT%/}/usr/share/php/.packagexml/${PEAR_P}-channel.xml" ]] ; 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_P}-channel.xml" \
+ "${EROOT%/}/usr/bin/peardev" channel-add \
+ "${EROOT%/}/usr/share/php/.packagexml/${PEAR_P}-channel.xml" \
|| einfo "Ignore any errors about existing channels"
fi
fi
# Register the package from the package{,2}.xml file
# It is not critical to complete so only warn on failure
- if [[ -f "${EROOT}usr/share/php/.packagexml/${PEAR_P}.xml" ]] ; then
- "${EROOT}usr/bin/peardev" install -nrO --force \
- "${EROOT}usr/share/php/.packagexml/${PEAR_P}.xml" 2> /dev/null \
+ if [[ -f "${EROOT%/}/usr/share/php/.packagexml/${PEAR_P}.xml" ]] ; then
+ "${EROOT%/}/usr/bin/peardev" install -nrO --force \
+ "${EROOT%/}/usr/share/php/.packagexml/${PEAR_P}.xml" 2> /dev/null \
|| ewarn "Failed to insert package into local PEAR database"
fi
}
@@ -123,5 +123,5 @@ php-pear-r2_pkg_postinst() {
# Deregister package from the local PEAR database
php-pear-r2_pkg_postrm() {
# Uninstall known dependency
- "${EROOT}usr/bin/peardev" uninstall -nrO "${PHP_PEAR_DOMAIN}/${PHP_PEAR_PKG_NAME}"
+ "${EROOT%/}/usr/bin/peardev" uninstall -nrO "${PHP_PEAR_DOMAIN}/${PHP_PEAR_PKG_NAME}"
}