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

Diff of /eclass/git.eclass

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

Revision 1.5 Revision 1.6
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 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/Attic/git.eclass,v 1.5 2007/04/10 11:42:29 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/git.eclass,v 1.6 2007/04/24 16:35:01 ferdy Exp $
4 4
5## --------------------------------------------------------------------------- # 5## --------------------------------------------------------------------------- #
6# subversion.eclass author: Akinori Hattori <hattya@gentoo.org> 6# subversion.eclass author: Akinori Hattori <hattya@gentoo.org>
7# modified for git by Donnie Berkholz <spyderous@gentoo.org> 7# modified for git by Donnie Berkholz <spyderous@gentoo.org>
8# improved by Fernando J. Pereda <ferdy@gentoo.org> 8# improved by Fernando J. Pereda <ferdy@gentoo.org>
27DESCRIPTION="Based on the ${ECLASS} eclass" 27DESCRIPTION="Based on the ${ECLASS} eclass"
28 28
29 29
30## -- add git in DEPEND 30## -- add git in DEPEND
31# 31#
32DEPEND=">=dev-util/git-1.4.0" 32DEPEND=">=dev-util/git-1.5"
33 33
34 34
35## -- EGIT_STORE_DIR: git sources store directory 35## -- EGIT_STORE_DIR: git sources store directory
36# 36#
37EGIT_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/git-src" 37EGIT_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/git-src"
210 ${EGIT_DIFFSTAT_CMD} ${oldsha1}..${EGIT_BRANCH} | cat 210 ${EGIT_DIFFSTAT_CMD} ${oldsha1}..${EGIT_BRANCH} | cat
211 fi 211 fi
212 212
213 einfo " local clone: ${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" 213 einfo " local clone: ${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
214 214
215 if ${EGIT_REPACK} ; then 215 if ${EGIT_REPACK} || ${EGIT_PRUNE} ; then
216 ebegin "Repacking objects" 216 ebegin "Garbage collecting the repository"
217 # Strangely enough mv asks confirmation 217 git gc $(${EGIT_PRUNE} && echo '--prune')
218 yes y | git repack -a -d -f -q > /dev/null
219 eend $?
220 fi
221
222 if ${EGIT_PRUNE} ; then
223 ebegin "Removing unreachable objects"
224 git prune
225 eend $? 218 eend $?
226 fi 219 fi
227 220
228 einfo " committish: ${EGIT_TREE}" 221 einfo " committish: ${EGIT_TREE}"
229 222
230 # export to the ${WORKDIR} 223 # export to the ${WORKDIR}
231 mkdir -p "${S}" 224 mkdir -p "${S}"
232 git tar-tree ${EGIT_TREE} | ( cd "${S}" ; tar xf - ) 225 git archive --format=tar ${EGIT_TREE} | ( cd "${S}" ; tar xf - )
233 226
234 echo ">>> Unpacked to ${S}" 227 echo ">>> Unpacked to ${S}"
235 228
236} 229}
237 230

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20