/[gentoo-x86]/eclass/git-2.eclass
Gentoo

Diff of /eclass/git-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.22 Revision 1.24
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.22 2011/09/23 13:58:22 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
505 debug-print "${FUNCNAME}: working in bare repository for \"${EGIT_DIR}\"" 517 debug-print "${FUNCNAME}: working in bare repository for \"${EGIT_DIR}\""
506 EGIT_LOCAL_OPTIONS+="${EGIT_OPTIONS} --bare" 518 EGIT_LOCAL_OPTIONS+="${EGIT_OPTIONS} --bare"
507 MOVE_COMMAND="git clone -l -s -n ${EGIT_DIR// /\\ }" 519 MOVE_COMMAND="git clone -l -s -n ${EGIT_DIR// /\\ }"
508 EGIT_UPDATE_CMD="git fetch -t -f -u origin ${EGIT_BRANCH}:${EGIT_BRANCH}" 520 EGIT_UPDATE_CMD="git fetch -t -f -u origin ${EGIT_BRANCH}:${EGIT_BRANCH}"
509 UPSTREAM_BRANCH="${EGIT_BRANCH}" 521 UPSTREAM_BRANCH="${EGIT_BRANCH}"
522 EGIT_LOCAL_NONBARE=
510 else 523 else
511 debug-print "${FUNCNAME}: working in bare repository for non-bare \"${EGIT_DIR}\"" 524 debug-print "${FUNCNAME}: working in bare repository for non-bare \"${EGIT_DIR}\""
512 MOVE_COMMAND="cp -pPR ." 525 MOVE_COMMAND="cp -pPR ."
513 EGIT_LOCAL_OPTIONS="${EGIT_OPTIONS}" 526 EGIT_LOCAL_OPTIONS="${EGIT_OPTIONS}"
514 EGIT_UPDATE_CMD="git pull -f -u ${EGIT_OPTIONS}" 527 EGIT_UPDATE_CMD="git pull -f -u ${EGIT_OPTIONS}"

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.20