diff options
author | Michał Górny <mgorny@gentoo.org> | 2011-09-23 13:58:58 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2011-09-23 13:58:58 +0000 |
commit | 796a092873e3c82268c3dda506850b3c57167464 (patch) | |
tree | 4ec126f84a3a95292ae7e698180002ed5ba49fe3 /eclass/git-2.eclass | |
parent | Ensure EGIT_LOCAL_NONBARE doesn't leak in from env. (diff) | |
download | historical-796a092873e3c82268c3dda506850b3c57167464.tar.gz historical-796a092873e3c82268c3dda506850b3c57167464.tar.bz2 historical-796a092873e3c82268c3dda506850b3c57167464.zip |
Try to migrate git.eclass checkouts to the new eclass.
Fixes: https://bugs.gentoo.org/show_bug.cgi?id=383761
Diffstat (limited to 'eclass/git-2.eclass')
-rw-r--r-- | eclass/git-2.eclass | 14 |
1 files changed, 13 insertions, 1 deletions
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}\"." |