From: Michał Górny Date: Fri, 23 Sep 2011 13:58:58 +0000 (+0000) Subject: Try to migrate git.eclass checkouts to the new eclass. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=796a092873e3c82268c3dda506850b3c57167464;p=gentoo.git Try to migrate git.eclass checkouts to the new eclass. Fixes: https://bugs.gentoo.org/show_bug.cgi?id=383761 --- diff --git a/eclass/git-2.eclass b/eclass/git-2.eclass index d2a8a2e3a73e..59db57eaa2c3 100644 --- a/eclass/git-2.eclass +++ b/eclass/git-2.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/git-2.eclass,v 1.23 2011/09/23 13:58:35 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/git-2.eclass,v 1.24 2011/09/23 13:58:58 mgorny Exp $ # @ECLASS: git-2.eclass # @MAINTAINER: @@ -264,6 +264,18 @@ git-2_prepare_storedir() { clone_dir=${EGIT_REPO_URI##*/} fi EGIT_DIR=${EGIT_STORE_DIR}/${clone_dir} + + # Try to migrate from git.eclass git-src/ + if [[ ! -d ${EGIT_DIR} && ${EGIT_STORE_DIR} == */egit-src ]]; then + local old_store_dir=${EGIT_STORE_DIR/%egit-src/git-src} + local old_location=${old_store_dir}/${EGIT_PROJECT:-${PN}} + + if [[ -d ${old_location} ]]; then + elog "${FUNCNAME}: ${CATEGORY}/${PF} will be cloned from old location." + elog "It will be necessary to rebuild the package to fetch updates." + EGIT_REPO_URI="${old_location} ${EGIT_REPO_URI}" + fi + fi fi export EGIT_DIR=${EGIT_DIR} debug-print "${FUNCNAME}: Storing the repo into \"${EGIT_DIR}\"."