cd to ${WORKDIR} if the ${S} directory does not exist. (branches/2.1.2 r7557 and...
authorZac Medico <zmedico@gentoo.org>
Wed, 15 Aug 2007 20:25:11 +0000 (20:25 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 15 Aug 2007 20:25:11 +0000 (20:25 -0000)
svn path=/main/branches/2.1.2.9/; revision=7612

bin/ebuild.sh

index 3697ccbc8136c5350779675247d012d074789a51..a46db56beb3ff5e6d5f75d1c2340ea5c2afdc4f2 100755 (executable)
@@ -972,6 +972,8 @@ dyn_compile() {
        if [ -d "${S}" ]; then
                srcdir=${S}
                cd "${S}"
+       else
+               cd "${WORKDIR}"
        fi
        #our custom version of libtool uses $S and $D to fix
        #invalid paths in .la files
@@ -1029,6 +1031,8 @@ dyn_test() {
        trap "abort_test" SIGINT SIGQUIT
        if [ -d "${S}" ]; then
                cd "${S}"
+       else
+               cd "${WORKDIR}"
        fi
        if ! hasq test $FEATURES && [ "${EBUILD_FORCE_TEST}" != "1" ]; then
                vecho ">>> Test phase [not enabled]: ${CATEGORY}/${PF}"
@@ -1065,6 +1069,8 @@ dyn_install() {
        mkdir "${PORTAGE_BUILDDIR}/image"
        if [ -d "${S}" ]; then
                cd "${S}"
+       else
+               cd "${WORKDIR}"
        fi
        vecho
        vecho ">>> Install ${PF} into ${D} category ${CATEGORY}"