How about something like

case ${EAPI} in
        5) : ;;
        *) die "EAPI=${EAPI:-0} is not supported" ;;
esac
to force people to stay up2date... then you can also drop most of those
redunant "|| die"s for EAPI functions


> 
> IUSE="test"
> RDEPEND="
>       dev-util/catkin${CATKIN_PYTHON_USEDEP}
>       dev-python/empy${CATKIN_PYTHON_USEDEP}
> "
> DEPEND="${RDEPEND}"
> 
> if [ -n "${CATKIN_DO_PYTHON_MULTIBUILD}" ] ; then
>       RDEPEND="${RDEPEND} dev-lang/python-exec:2"
> fi
> 
> # @ECLASS-VARIABLE: CATKIN_HAS_MESSAGES
> # @DESCRIPTION:
> # Set it to a non-empty value before inherit to tell the eclass the package 
> has messages to build.
> # Messages will be built based on ROS_MESSAGES USE_EXPANDed variable.
> 
> # @ECLASS-VARIABLE: CATKIN_MESSAGES_TRANSITIVE_DEPS
> # @DESCRIPTION:
> # Some messages have dependencies on other messages.
> # In that case, CATKIN_MESSAGES_TRANSITIVE_DEPS should contain a 
> space-separated list of atoms
> # representing those dependencies. The eclass uses it to ensure proper 
> dependencies on these packages. 
> if [ -n "${CATKIN_HAS_MESSAGES}" ] ; then
>       IUSE="${IUSE} +ros_messages_python +ros_messages_cxx ros_messages_eus 
> ros_messages_lisp"
>       RDEPEND="${RDEPEND}
>               ros_messages_cxx?    ( dev-ros/gencpp:=${CATKIN_PYTHON_USEDEP}  
> )
>               ros_messages_eus?    ( dev-ros/geneus:=${CATKIN_PYTHON_USEDEP}  
> )
>               ros_messages_python? ( dev-ros/genpy:=${CATKIN_PYTHON_USEDEP}   
> )
>               ros_messages_lisp?   ( dev-ros/genlisp:=${CATKIN_PYTHON_USEDEP} 
> )
>               dev-ros/message_runtime
>       "
>       DEPEND="${DEPEND} ${RDEPEND}
>               dev-ros/message_generation
>               dev-ros/genmsg${CATKIN_PYTHON_USEDEP}
>       "
>       if [ -n "${CATKIN_MESSAGES_TRANSITIVE_DEPS}" ] ; then
>               for i in ${CATKIN_MESSAGES_TRANSITIVE_DEPS} ; do
>                       
> ds="${i}[ros_messages_python?,ros_messages_cxx?,ros_messages_lisp?,ros_messages_eus?]
>  ros_messages_python? ( ${i}[${PYTHON_USEDEP}] )"
>                       RDEPEND="${RDEPEND} ${ds}"
>                       DEPEND="${DEPEND} ${ds}"
>               done
>       fi
> fi
> 

Keep in mind what this implies when you change these dependencies
without bumping the ebuilds that use them.

> 
> # @FUNCTION: ros-catkin_src_test_internal
> # @DESCRIPTION:
> # Decorator around cmake-utils_src_test to ensure tests are built before 
> running them.
> ros-catkin_src_test_internal() {
>       cd "${BUILD_DIR}"

here is definitely a "|| die" missing, alternatively
emake -C "${BUILD_DIR}" ...
should work too and it seems cmake-utils_src_test already switches to
"${BUILD_DIR}" (with missing error handling, lol)



> 
> # @FUNCTION: ros-catkin_src_install_with_python
> # @DESCRIPTION:
> # Decorator around cmake-utils_src_install to ensure python scripts are 
> properly handled w.r.t. python-exec2.
> ros-catkin_src_install_with_python() {
>       python_export PYTHON_SCRIPTDIR
>       cmake-utils_src_install
>       if [ ! -f "${T}/.catkin_python_symlinks_generated" -a -d 
> "${D}/${PYTHON_SCRIPTDIR}" ]; then
>               dodir /usr/bin
>               for i in "${D}/${PYTHON_SCRIPTDIR}"/* ; do
>                       dosym ../lib/python-exec/python-exec2 
> "/usr/bin/${i##*/}" || die
>               done
>               touch "${T}/.catkin_python_symlinks_generated"

touch can fail too, e.g. if the directory does not exist, so "|| die"
seems to make sense too



Reply via email to