ebuild.sh: add dummy funcs for "depend" phase
authorZac Medico <zmedico@gentoo.org>
Sun, 11 Sep 2011 21:16:23 +0000 (14:16 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 11 Sep 2011 21:16:23 +0000 (14:16 -0700)
bin/ebuild.sh

index a5cc5efe596a18db64577e364714533667bbd320..936405d962230dea9b81918e1f8f36b75d893854 100755 (executable)
@@ -833,6 +833,15 @@ trap 'exit 1' SIGTERM
 if [[ $EBUILD_PHASE != depend ]] ; then
        source "${PORTAGE_BIN_PATH}/phase-functions.sh"
        source "${PORTAGE_BIN_PATH}/phase-helpers.sh"
+else
+       # These dummy functions are for things that are likely to be called
+       # in global scope, even though they are completely useless during
+       # the "depend" phase.
+       for x in diropts docompress exeopts insopts \
+               keepdir libopts use_with use_enable ; do
+               eval "${x}() { : ; }"
+       done
+       unset x
 fi
 
 if ! has "$EBUILD_PHASE" clean cleanrm depend && \