Skip to content

Commit

Permalink
dev-lang/php: enforce what was an elog warning with REQUIRED_USE.
Browse files Browse the repository at this point in the history
The interactive "php -a" command-line interface will hang unless PHP
is built with USE=readline. This used to be an elog warning, but was
rather easy to overlook and mysterious to those who hit the bug. We
already have REQUIRED_USE for our other flags, so it makes sense to
enforce the cli dependency on readline there.

Package-Manager: portage-2.2.26
  • Loading branch information
orlitzky committed Jan 28, 2016
1 parent 640b01d commit b3035c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ DEPEND="${DEPEND}

php="=${CATEGORY}/${PF}"

# Without USE=readline, the interactive "php -a" CLI will hang.
REQUIRED_USE="
cli? ( readline )
truetype? ( gd )
vpx? ( gd )
cjk? ( gd )
Expand Down Expand Up @@ -774,11 +776,6 @@ pkg_postinst() {
elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes"
elog "php${SLOT/./-} in order to compile extensions for the ${SLOT} ABI."
elog
if ! use readline && use cli ; then
ewarn "Note that in order to use php interactivly, you need to"
ewarn "enable the readline USE flag or php -a will hang."
elog
fi
elog "This ebuild installed a version of php.ini based on"
elog "php.ini-${PHP_INI_VERSION}. You can choose which version of"
elog "php.ini to install by default by setting PHP_INI_VERSION"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ DEPEND="${DEPEND}

php="=${CATEGORY}/${PF}"

# Without USE=readline, the interactive "php -a" CLI will hang.
REQUIRED_USE="
cli? ( readline )
truetype? ( gd )
vpx? ( gd )
cjk? ( gd )
Expand Down Expand Up @@ -766,11 +768,6 @@ pkg_postinst() {
elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes"
elog "php${SLOT/./-} in order to compile extensions for the ${SLOT} ABI."
elog
if ! use readline && use cli ; then
ewarn "Note that in order to use php interactivly, you need to"
ewarn "enable the readline USE flag or php -a will hang."
elog
fi
elog "This ebuild installed a version of php.ini based on"
elog "php.ini-${PHP_INI_VERSION}. You can choose which version of"
elog "php.ini to install by default by setting PHP_INI_VERSION"
Expand Down

0 comments on commit b3035c9

Please sign in to comment.