| 1 | # Copyright 1999-2011 Gentoo Foundation |
1 | # Copyright 1999-2011 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/git-2.eclass,v 1.23 2011/09/23 13:58:35 mgorny Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/git-2.eclass,v 1.24 2011/09/23 13:58:58 mgorny Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: git-2.eclass |
5 | # @ECLASS: git-2.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # Donnie Berkholz <dberkholz@gentoo.org> |
7 | # Donnie Berkholz <dberkholz@gentoo.org> |
| 8 | # @BLURB: Eclass for fetching and unpacking git repositories. |
8 | # @BLURB: Eclass for fetching and unpacking git repositories. |
| … | |
… | |
| 262 | clone_dir=${EGIT_PROJECT} |
262 | clone_dir=${EGIT_PROJECT} |
| 263 | else |
263 | else |
| 264 | clone_dir=${EGIT_REPO_URI##*/} |
264 | clone_dir=${EGIT_REPO_URI##*/} |
| 265 | fi |
265 | fi |
| 266 | EGIT_DIR=${EGIT_STORE_DIR}/${clone_dir} |
266 | EGIT_DIR=${EGIT_STORE_DIR}/${clone_dir} |
|
|
267 | |
|
|
268 | # Try to migrate from git.eclass git-src/ |
|
|
269 | if [[ ! -d ${EGIT_DIR} && ${EGIT_STORE_DIR} == */egit-src ]]; then |
|
|
270 | local old_store_dir=${EGIT_STORE_DIR/%egit-src/git-src} |
|
|
271 | local old_location=${old_store_dir}/${EGIT_PROJECT:-${PN}} |
|
|
272 | |
|
|
273 | if [[ -d ${old_location} ]]; then |
|
|
274 | elog "${FUNCNAME}: ${CATEGORY}/${PF} will be cloned from old location." |
|
|
275 | elog "It will be necessary to rebuild the package to fetch updates." |
|
|
276 | EGIT_REPO_URI="${old_location} ${EGIT_REPO_URI}" |
|
|
277 | fi |
|
|
278 | fi |
| 267 | fi |
279 | fi |
| 268 | export EGIT_DIR=${EGIT_DIR} |
280 | export EGIT_DIR=${EGIT_DIR} |
| 269 | debug-print "${FUNCNAME}: Storing the repo into \"${EGIT_DIR}\"." |
281 | debug-print "${FUNCNAME}: Storing the repo into \"${EGIT_DIR}\"." |
| 270 | } |
282 | } |
| 271 | |
283 | |