Skip the install phase when ${PORTAGE_BUILDDIR}/.installed exists. See bug #137864.
authorZac Medico <zmedico@gentoo.org>
Sat, 24 Jun 2006 23:57:26 +0000 (23:57 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 24 Jun 2006 23:57:26 +0000 (23:57 -0000)
svn path=/main/trunk/; revision=3646

bin/ebuild.sh

index 651fdecb37214d3554b33034904b48fa8f8f3615..73fe3a4fde491ccba7093840a710bb91ab9da254 100755 (executable)
@@ -996,6 +996,11 @@ dyn_test() {
 
 dyn_install() {
        [ -z "$PORTAGE_BUILDDIR" ] && die "${FUNCNAME}: PORTAGE_BUILDDIR is unset"
+       if [ "${PORTAGE_BUILDDIR}/.installed" -nt "${WORKDIR}" ]; then
+               vecho ">>> It appears that '${PF}' is already installed; skipping."
+               vecho ">>> Remove '${PORTAGE_BUILDDIR}/.installed' to force install."
+               return 0
+       fi
        trap "abort_install" SIGINT SIGQUIT
        [ "$(type -t pre_src_install)" == "function" ] && pre_src_install
        rm -rf "${PORTAGE_BUILDDIR}/image"