Only enable the PORTAGE_IUSE check during build time phases
authorZac Medico <zmedico@gentoo.org>
Tue, 18 Dec 2007 08:22:34 +0000 (08:22 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 18 Dec 2007 08:22:34 +0000 (08:22 -0000)
since that's the only time it's valid for now. (trunk r8951)

svn path=/main/branches/2.1.2/; revision=8952

bin/ebuild.sh

index e88f734423f6b0b8f4db8af0f0f1b2a3062f4219..27355a339673d2ab8422242f41356a3f4aebaee7 100755 (executable)
@@ -138,7 +138,12 @@ useq() {
        fi
 
        # Make sure we have this USE flag in IUSE
-       if [[ ${EBUILD_PHASE} != depend ]] && [[ -n ${PORTAGE_IUSE} ]] ; then
+       if [[ -n ${PORTAGE_IUSE} ]] && \
+               [[ -n ${EBUILD_PHASE} ]] && \
+               ! hasq ${EBUILD_PHASE} config depend info prerm postrm postinst && \
+               [[ ${EMERGE_FROM} != binary ]] ; then
+               # TODO: Implement PORTAGE_IUSE for binary packages. Currently,
+               # it is only valid for build time phases.
                echo "${u}" | egrep -q "${PORTAGE_IUSE}" || \
                        eqawarn "QA Notice: USE Flag '${u}' not" \
                                "in IUSE for ${CATEGORY}/${PF}"