public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2007-11-14 20:43 Fernando J. Pereda (ferdy)
  0 siblings, 0 replies; 48+ messages in thread
From: Fernando J. Pereda (ferdy) @ 2007-11-14 20:43 UTC (permalink / raw
  To: gentoo-commits

ferdy       07/11/14 20:43:44

  Modified:             git.eclass
  Log:
  Unconditionally set remote.origin.url as per bug #197193

Revision  Changes    Path
1.7                  eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.7&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.7&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.6&r2=1.7

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- git.eclass	24 Apr 2007 16:35:01 -0000	1.6
+++ git.eclass	14 Nov 2007 20:43:43 -0000	1.7
@@ -1,6 +1,6 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.6 2007/04/24 16:35:01 ferdy Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.7 2007/11/14 20:43:43 ferdy Exp $
 
 ## --------------------------------------------------------------------------- #
 # subversion.eclass author: Akinori Hattori <hattya@gentoo.org>
@@ -195,8 +195,11 @@
 			|| die "${EGIT}: can't fetch from ${EGIT_REPO_URI}."
 
 		# We use --bare cloning, so git doesn't do this for us.
-		git repo-config remote.origin.url "${EGIT_REPO_URI}"
+		git config remote.origin.url "${EGIT_REPO_URI}"
 	else
+		# Git urls might change, so unconditionally set it here
+		git config remote.origin.url "${EGIT_REPO_URI}"
+
 		# fetch updates
 		einfo "git update start -->"
 		einfo "   repository: ${EGIT_REPO_URI}"



-- 
gentoo-commits@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2007-12-27  1:02 Robin H. Johnson (robbat2)
  0 siblings, 0 replies; 48+ messages in thread
From: Robin H. Johnson (robbat2) @ 2007-12-27  1:02 UTC (permalink / raw
  To: gentoo-commits

robbat2     07/12/27 01:02:30

  Modified:             git.eclass
  Log:
  Add comment about usage of EGIT_BRANCH and where it should go in relation to "inherit git".

Revision  Changes    Path
1.8                  eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.8&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.8&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.7&r2=1.8

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.7
retrieving revision 1.8
diff -p -w -b -B -u -u -r1.7 -r1.8
--- git.eclass	14 Nov 2007 20:43:43 -0000	1.7
+++ git.eclass	27 Dec 2007 01:02:30 -0000	1.8
@@ -1,6 +1,6 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.7 2007/11/14 20:43:43 ferdy Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.8 2007/12/27 01:02:30 robbat2 Exp $
 
 ## --------------------------------------------------------------------------- #
 # subversion.eclass author: Akinori Hattori <hattya@gentoo.org>
@@ -113,6 +113,8 @@ EGIT_DIFFSTAT_CMD="git diff --stat"
 ## -- EGIT_BRANCH:
 #
 # git eclass can fetch any branch in git_fetch().
+# If set, it must be before 'inherit git', otherwise both EGIT_BRANCH and
+# EGIT_TREE must be set after 'inherit git'.
 # Defaults to 'master'
 #
 : ${EGIT_BRANCH:=master}



-- 
gentoo-commits@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2008-03-30  5:39 Robin H. Johnson (robbat2)
  0 siblings, 0 replies; 48+ messages in thread
From: Robin H. Johnson (robbat2) @ 2008-03-30  5:39 UTC (permalink / raw
  To: gentoo-commits

robbat2     08/03/30 05:39:59

  Modified:             git.eclass
  Log:
  Add EGIT_OFFLINE support to git.eclass, modelled after the svn.eclass offline mode. Very useful if the upstream repo is offline for maintenance.

Revision  Changes    Path
1.9                  eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.8&r2=1.9

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.8
retrieving revision 1.9
diff -p -w -b -B -u -u -r1.8 -r1.9
--- git.eclass	27 Dec 2007 01:02:30 -0000	1.8
+++ git.eclass	30 Mar 2008 05:39:59 -0000	1.9
@@ -1,6 +1,6 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.8 2007/12/27 01:02:30 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.9 2008/03/30 05:39:59 robbat2 Exp $
 
 ## --------------------------------------------------------------------------- #
 # subversion.eclass author: Akinori Hattori <hattya@gentoo.org>
@@ -95,6 +95,12 @@ EGIT_DIFFSTAT_CMD="git diff --stat"
 #
 : ${EGIT_BOOTSTRAP:=}
 
+# @ECLASS-VARIABLE: EGIT_OFFLINE
+# @DESCRIPTION:
+# Set this variable to a non-empty value to disable the automatic updating of
+# an GIT source tree. This is intended to be set outside the subversion source
+# tree by users.
+EGIT_OFFLINE="${EGIT_OFFLINE:-${ESCM_OFFLINE}}"
 
 ## -- EGIT_PATCHES:
 #
@@ -198,6 +204,11 @@ git_fetch() {
 
 		# We use --bare cloning, so git doesn't do this for us.
 		git config remote.origin.url "${EGIT_REPO_URI}"
+	elif [[ -n ${EGIT_OFFLINE} ]] ; then
+		local oldsha1=$(git rev-parse ${EGIT_BRANCH})
+		einfo "git update offline mode -->"
+		einfo "   repository: ${EGIT_REPO_URI}"
+		einfo "   commit: ${oldsha1}"
 	else
 		# Git urls might change, so unconditionally set it here
 		git config remote.origin.url "${EGIT_REPO_URI}"



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2008-03-30  5:52 Robin H. Johnson (robbat2)
  0 siblings, 0 replies; 48+ messages in thread
From: Robin H. Johnson (robbat2) @ 2008-03-30  5:52 UTC (permalink / raw
  To: gentoo-commits

robbat2     08/03/30 05:52:27

  Modified:             git.eclass
  Log:
  Fix a comment.

Revision  Changes    Path
1.10                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.9&r2=1.10

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.9
retrieving revision 1.10
diff -p -w -b -B -u -u -r1.9 -r1.10
--- git.eclass	30 Mar 2008 05:39:59 -0000	1.9
+++ git.eclass	30 Mar 2008 05:52:27 -0000	1.10
@@ -1,6 +1,6 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.9 2008/03/30 05:39:59 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.10 2008/03/30 05:52:27 robbat2 Exp $
 
 ## --------------------------------------------------------------------------- #
 # subversion.eclass author: Akinori Hattori <hattya@gentoo.org>
@@ -98,7 +98,7 @@ EGIT_DIFFSTAT_CMD="git diff --stat"
 # @ECLASS-VARIABLE: EGIT_OFFLINE
 # @DESCRIPTION:
 # Set this variable to a non-empty value to disable the automatic updating of
-# an GIT source tree. This is intended to be set outside the subversion source
+# an GIT source tree. This is intended to be set outside the git source
 # tree by users.
 EGIT_OFFLINE="${EGIT_OFFLINE:-${ESCM_OFFLINE}}"
 



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2008-06-05 15:44 Bo Oersted Andresen (zlin)
  0 siblings, 0 replies; 48+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-06-05 15:44 UTC (permalink / raw
  To: gentoo-commits

zlin        08/06/05 15:44:02

  Modified:             git.eclass
  Log:
  Do EGIT_STORE_DIR must not be world writable.

Revision  Changes    Path
1.11                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.10&r2=1.11

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- git.eclass	30 Mar 2008 05:52:27 -0000	1.10
+++ git.eclass	5 Jun 2008 15:44:01 -0000	1.11
@@ -1,6 +1,6 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.10 2008/03/30 05:52:27 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.11 2008/06/05 15:44:01 zlin Exp $
 
 ## --------------------------------------------------------------------------- #
 # subversion.eclass author: Akinori Hattori <hattya@gentoo.org>
@@ -176,8 +176,6 @@
 		addwrite /
 		mkdir -p "${EGIT_STORE_DIR}" \
 			|| die "${EGIT}: can't mkdir ${EGIT_STORE_DIR}."
-		chmod -f o+rw "${EGIT_STORE_DIR}" \
-			|| die "${EGIT}: can't chmod ${EGIT_STORE_DIR}."
 		export SANDBOX_WRITE="${SANDBOX_WRITE%%:/}"
 	fi
 



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2008-06-15 17:47 Bo Oersted Andresen (zlin)
  0 siblings, 0 replies; 48+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-06-15 17:47 UTC (permalink / raw
  To: gentoo-commits

zlin        08/06/15 17:47:57

  Modified:             git.eclass
  Log:
  Make GIT_DIR an absolute path exported during git_fetch().

Revision  Changes    Path
1.12                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.12&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.12&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.11&r2=1.12

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- git.eclass	5 Jun 2008 15:44:01 -0000	1.11
+++ git.eclass	15 Jun 2008 17:47:57 -0000	1.12
@@ -1,6 +1,6 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.11 2008/06/05 15:44:01 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.12 2008/06/15 17:47:57 zlin Exp $
 
 ## --------------------------------------------------------------------------- #
 # subversion.eclass author: Akinori Hattori <hattya@gentoo.org>
@@ -190,7 +190,7 @@
 
 	debug-print "${FUNCNAME}: EGIT_OPTIONS = \"${EGIT_OPTIONS}\""
 
-	export GIT_DIR="${EGIT_CLONE_DIR}"
+	export GIT_DIR="${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
 
 	if [[ ! -d ${EGIT_CLONE_DIR} ]] ; then
 		# first clone



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2008-06-16  7:51 Bo Oersted Andresen (zlin)
  0 siblings, 0 replies; 48+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-06-16  7:51 UTC (permalink / raw
  To: gentoo-commits

zlin        08/06/16 07:51:01

  Modified:             git.eclass
  Log:
  Export GIT_WORK_TREE and use git checkout to get a work tree in S.

Revision  Changes    Path
1.13                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.13&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.13&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.12&r2=1.13

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- git.eclass	15 Jun 2008 17:47:57 -0000	1.12
+++ git.eclass	16 Jun 2008 07:51:00 -0000	1.13
@@ -1,6 +1,6 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.12 2008/06/15 17:47:57 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.13 2008/06/16 07:51:00 zlin Exp $
 
 ## --------------------------------------------------------------------------- #
 # subversion.eclass author: Akinori Hattori <hattya@gentoo.org>
@@ -190,7 +190,9 @@
 
 	debug-print "${FUNCNAME}: EGIT_OPTIONS = \"${EGIT_OPTIONS}\""
 
+	mkdir -p "${S}"
 	export GIT_DIR="${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
+	export GIT_WORK_TREE="${S}"
 
 	if [[ ! -d ${EGIT_CLONE_DIR} ]] ; then
 		# first clone
@@ -235,8 +237,7 @@
 	einfo "   committish: ${EGIT_TREE}"
 
 	# export to the ${WORKDIR}
-	mkdir -p "${S}"
-	git archive --format=tar ${EGIT_TREE} | ( cd "${S}" ; tar xf - )
+	git checkout -f ${EGIT_TREE}
 
 	echo ">>> Unpacked to ${S}"
 



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2008-06-16 11:22 Bo Oersted Andresen (zlin)
  0 siblings, 0 replies; 48+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-06-16 11:22 UTC (permalink / raw
  To: gentoo-commits

zlin        08/06/16 11:22:38

  Modified:             git.eclass
  Log:
  Revert last commit as it turns out it breaks with latest stable git (1.5.4.x and below).

Revision  Changes    Path
1.14                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.14&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.14&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.13&r2=1.14

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- git.eclass	16 Jun 2008 07:51:00 -0000	1.13
+++ git.eclass	16 Jun 2008 11:22:38 -0000	1.14
@@ -1,6 +1,6 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.13 2008/06/16 07:51:00 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.14 2008/06/16 11:22:38 zlin Exp $
 
 ## --------------------------------------------------------------------------- #
 # subversion.eclass author: Akinori Hattori <hattya@gentoo.org>
@@ -190,9 +190,7 @@
 
 	debug-print "${FUNCNAME}: EGIT_OPTIONS = \"${EGIT_OPTIONS}\""
 
-	mkdir -p "${S}"
 	export GIT_DIR="${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
-	export GIT_WORK_TREE="${S}"
 
 	if [[ ! -d ${EGIT_CLONE_DIR} ]] ; then
 		# first clone
@@ -237,7 +235,8 @@
 	einfo "   committish: ${EGIT_TREE}"
 
 	# export to the ${WORKDIR}
-	git checkout -f ${EGIT_TREE}
+	mkdir -p "${S}"
+	git archive --format=tar ${EGIT_TREE} | ( cd "${S}" ; tar xf - )
 
 	echo ">>> Unpacked to ${S}"
 



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-02-19 17:07 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-02-19 17:07 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/02/19 17:07:28

  Modified:             git.eclass
  Log:
  Update git.eclass. Now consumes less bandwitch. Per bug #255451. Thanks to reavertm for the patch. Also add myself as maintainer.

Revision  Changes    Path
1.15                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.14&r2=1.15

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- git.eclass	16 Jun 2008 11:22:38 -0000	1.14
+++ git.eclass	19 Feb 2009 17:07:28 -0000	1.15
@@ -1,11 +1,12 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.14 2008/06/16 11:22:38 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.15 2009/02/19 17:07:28 scarabeus Exp $
 
 ## --------------------------------------------------------------------------- #
 # subversion.eclass author: Akinori Hattori <hattya@gentoo.org>
 # modified for git by Donnie Berkholz <spyderous@gentoo.org>
 # improved by Fernando J. Pereda <ferdy@gentoo.org>
+# you should currently poke with updates Tomas Chvatal <scarabeus@gentoo.org>
 #
 # The git eclass is written to fetch the software sources from
 # git repositories like the subversion eclass.
@@ -39,7 +40,7 @@
 
 ## -- EGIT_FETCH_CMD:  git clone command
 #
-EGIT_FETCH_CMD="git clone --bare"
+EGIT_FETCH_CMD="git clone --bare --depth 1"
 
 ## -- EGIT_UPDATE_CMD:  git fetch command
 #






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-03-19 11:51 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-03-19 11:51 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/03/19 11:51:13

  Modified:             git.eclass
  Log:
  Update --depth 1 behavior for only working cases.

Revision  Changes    Path
1.16                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.16&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.16&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.15&r2=1.16

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- git.eclass	19 Feb 2009 17:07:28 -0000	1.15
+++ git.eclass	19 Mar 2009 11:51:13 -0000	1.16
@@ -1,6 +1,6 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.15 2009/02/19 17:07:28 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.16 2009/03/19 11:51:13 scarabeus Exp $
 
 ## --------------------------------------------------------------------------- #
 # subversion.eclass author: Akinori Hattori <hattya@gentoo.org>
@@ -40,7 +40,7 @@
 
 ## -- EGIT_FETCH_CMD:  git clone command
 #
-EGIT_FETCH_CMD="git clone --bare --depth 1"
+EGIT_FETCH_CMD="git clone --bare"
 
 ## -- EGIT_UPDATE_CMD:  git fetch command
 #
@@ -189,6 +189,12 @@
 	[[ -z ${EGIT_REPO_URI##*/} ]] && EGIT_REPO_URI="${EGIT_REPO_URI%/}"
 	EGIT_CLONE_DIR="${EGIT_PROJECT}"
 
+	# determine whether to perform shallow clone
+	local EGIT_FETCH_OPTS
+	if [[ ${EGIT_BRANCH} = ${EGIT_TREE} ]] && [[ ${EGIT_BRANCH} = master ]] ; then
+		EGIT_FETCH_OPTS="--depth 1"
+	fi
+
 	debug-print "${FUNCNAME}: EGIT_OPTIONS = \"${EGIT_OPTIONS}\""
 
 	export GIT_DIR="${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
@@ -198,7 +204,7 @@
 		einfo "git clone start -->"
 		einfo "   repository: ${EGIT_REPO_URI}"
 
-		${EGIT_FETCH_CMD} ${EGIT_OPTIONS} "${EGIT_REPO_URI}" ${EGIT_PROJECT} \
+		${EGIT_FETCH_CMD} ${EGIT_FETCH_OPTS} ${EGIT_OPTIONS} "${EGIT_REPO_URI}" ${EGIT_PROJECT} \
 			|| die "${EGIT}: can't fetch from ${EGIT_REPO_URI}."
 
 		# We use --bare cloning, so git doesn't do this for us.






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-04-05 20:22 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-04-05 20:22 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/04/05 20:22:15

  Modified:             git.eclass
  Log:
  EAPI2fy git eclass. Make it eclassdoc compatible (at least i hope :])
  There are new elog informations which are requested by upstream often.
  Note that this elog can be supresed by setting EGIT_QUIET="ON" in make.conf or somewhere else in the env. :]

Revision  Changes    Path
1.17                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.17&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.17&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.16&r2=1.17

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- git.eclass	19 Mar 2009 11:51:13 -0000	1.16
+++ git.eclass	5 Apr 2009 20:22:15 -0000	1.17
@@ -1,99 +1,95 @@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.16 2009/03/19 11:51:13 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.17 2009/04/05 20:22:15 scarabeus Exp $
 
-## --------------------------------------------------------------------------- #
-# subversion.eclass author: Akinori Hattori <hattya@gentoo.org>
-# modified for git by Donnie Berkholz <spyderous@gentoo.org>
-# improved by Fernando J. Pereda <ferdy@gentoo.org>
-# you should currently poke with updates Tomas Chvatal <scarabeus@gentoo.org>
-#
-# The git eclass is written to fetch the software sources from
-# git repositories like the subversion eclass.
-#
-#
-# Description:
-#   If you use this eclass, the ${S} is ${WORKDIR}/${P}.
-#   It is necessary to define the EGIT_REPO_URI variable at least.
-#
-## --------------------------------------------------------------------------- #
+# @ECLASS: git.eclass
+# @MAINTAINER:
+# Tomas Chvatal <scarabeus@gentoo.org>
+# Donnie Berkholz <dberkholz@gentoo.org>
+# @BLURB: This eclass provides functions for fetch and unpack git repozitories
+# @DESCRIPTION:
+# The eclass is based on subversion eclass.
+# If you use this eclass, the ${S} is ${WORKDIR}/${P}.
+# It is necessary to define the EGIT_REPO_URI variable at least.
+# @THANKS TO:
+# Fernando J. Pereda <ferdy@gentoo.org>
 
 inherit eutils
 
 EGIT="git.eclass"
 
-EXPORT_FUNCTIONS src_unpack
-
-HOMEPAGE="http://git.or.cz/"
-DESCRIPTION="Based on the ${ECLASS} eclass"
+EXPORTED_FUNCTIONS="src_unpack"
+case "${EAPI:-0}" in
+	2) EXPORT_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;;
+	0|1) ;;
+	*) die "Unknown EAPI, Bug eclass maintainers." ;;
+esac
+EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
 
+# define some nice defaults but only if nothing is set already
+: ${HOMEPAGE:=http://git-scm.com/}
 
-## -- add git in DEPEND
-#
-DEPEND=">=dev-util/git-1.5"
+# We DEPEND on at least a bit recent git version
+DEPEND=">=dev-util/git-1.6"
 
+# @ECLASS-VARIABLE: EGIT_QUIET
+# @DESCRIPTION:
+# Enables user specified verbosity for the eclass elog informations.
+# The user just needs to add EGIT_QUIET="ON" to the /etc/make.conf.
+: ${EGIT_QUIET:="OFF"}
 
-## -- EGIT_STORE_DIR:  git sources store directory
-#
+# @ECLASS-VARIABLE: EGIT_STORE_DIR
+# @DESCRIPTION:
+# Storage directory for git sources.
 EGIT_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/git-src"
 
-
-## -- EGIT_FETCH_CMD:  git clone command
-#
+# @ECLASS-VARIABLE: EGIT_FETCH_CMD
+# @DESCRIPTION:
+# Command for cloning the repository.
 EGIT_FETCH_CMD="git clone --bare"
 
-## -- EGIT_UPDATE_CMD:  git fetch command
-#
+# @ECLASS-VARIABLE: EGIT_UPDATE_CMD
+# @DESCRIPTION:
+# Git fetch command.
 EGIT_UPDATE_CMD="git fetch -f -u"
 
-## -- EGIT_DIFFSTAT_CMD: Command to get diffstat output
-#
+# @ECLASS-VARIABLE: EGIT_DIFFSTAT_CMD
+# @DESCRIPTION:
+# Git command for diffstat.
 EGIT_DIFFSTAT_CMD="git diff --stat"
 
-
-## -- EGIT_OPTIONS:
-#
-# the options passed to clone and fetch
-#
+# @ECLASS-VARIABLE: EGIT_OPTIONS
+# @DESCRIPTION:
+# This variable value is passed to clone and fetch.
 : ${EGIT_OPTIONS:=}
 
-
-## -- EGIT_REPO_URI:  repository uri
-#
+# @ECLASS-VARIABLE: EGIT_REPO_URI
+# @DESCRIPTION:
+# URI for the repository
 # e.g. http://foo, git://bar
-#
-# supported protocols:
+# Supported protocols:
 #   http://
 #   https://
 #   git://
 #   git+ssh://
 #   rsync://
 #   ssh://
-#
 : ${EGIT_REPO_URI:=}
 
-
-## -- EGIT_PROJECT:  project name of your ebuild
-#
-# git eclass will check out the git repository like:
-#
-#   ${EGIT_STORE_DIR}/${EGIT_PROJECT}/${EGIT_REPO_URI##*/}
-#
+# @ECLASS-VARIABLE: EGIT_PROJECT
+# @DESCRIPTION:
+# Project name of your ebuild.
+# Git eclass will check out the git repository like:
+#	${EGIT_STORE_DIR}/${EGIT_PROJECT}/${EGIT_REPO_URI##*/}
 # so if you define EGIT_REPO_URI as http://git.collab.net/repo/git or
 # http://git.collab.net/repo/git. and PN is subversion-git.
 # it will check out like:
-#
-#   ${EGIT_STORE_DIR}/subversion
-#
-# default: ${PN/-git}.
-#
+#	${EGIT_STORE_DIR}/subversion
 : ${EGIT_PROJECT:=${PN/-git}}
 
-
-## -- EGIT_BOOTSTRAP:
-#
-# bootstrap script or command like autogen.sh or etc..
-#
+# @ECLASS-VARIABLE: EGIT_BOOSTRAP
+# @DESCRIPTION:
+# bootstrap script or command like autogen.sh or etc...
 : ${EGIT_BOOTSTRAP:=}
 
 # @ECLASS-VARIABLE: EGIT_OFFLINE
@@ -103,60 +99,55 @@
 # tree by users.
 EGIT_OFFLINE="${EGIT_OFFLINE:-${ESCM_OFFLINE}}"
 
-## -- EGIT_PATCHES:
-#
-# git eclass can apply pathces in git_bootstrap().
-# you can use regexp in this valiable like *.diff or *.patch or etc.
-# NOTE: this patches will apply before eval EGIT_BOOTSTRAP.
-#
-# the process of applying the patch is:
-#   1. just epatch it, if the patch exists in the path.
-#   2. scan it under FILESDIR and epatch it, if the patch exists in FILESDIR.
-#   3. die.
-#
-: ${EGIT_PATCHES:=}
-
+# @ECLASS-VARIABLE: EGIT_PATCHES
+# @DESCRIPTION:
+# Similar to PATCHES array from base.eclass
+# Only difference is that this patches are applied before bootstrap.
+# Please take note that this variable should be bash array.
 
-## -- EGIT_BRANCH:
-#
+# @ECLASS-VARIABLE: EGIT_BRANCH
+# @DESCRIPTION:
 # git eclass can fetch any branch in git_fetch().
-# If set, it must be before 'inherit git', otherwise both EGIT_BRANCH and
-# EGIT_TREE must be set after 'inherit git'.
-# Defaults to 'master'
-#
 : ${EGIT_BRANCH:=master}
 
-
-## -- EGIT_TREE:
-#
+# @ECLASS-VARIABLE: EGIT_TREE
+# @DESCRIPTION:
 # git eclass can checkout any tree.
-# Defaults to EGIT_BRANCH.
-#
 : ${EGIT_TREE:=${EGIT_BRANCH}}
 
-
-## - EGIT_REPACK:
-#
+# @ECLASS-VARIABLE: EGIT_REPACK
+# @DESCRIPTION:
 # git eclass will repack objects to save disk space. However this can take a
-# long time with VERY big repositories. If this is your case set:
-# EGIT_REPACK=false
-#
+# long time with VERY big repositories.
 : ${EGIT_REPACK:=false}
 
-## - EGIT_PRUNE:
-#
-# git eclass can prune the local clone. This is useful if upstream rewinds and
-# rebases branches too often. If you don't want this to happen, set:
-# EGIT_PRUNE=false
-#
+# @ECLASS-VARIABLE: EGIT_PRUNE
+# @DESCRIPTION:
+# git.eclass can prune the local clone. This is useful if upstream rewinds and
+# rebases branches too often.
 : ${EGIT_PRUNE:=false}
 
+# @FUNCTION: git_fetch
+# @DESCRIPTION:
+# Gets repository from EGIT_REPO_URI and store it in specified EGIT_STORE_DIR
+git_fetch() {
+	debug-print-function ${FUNCNAME} "$@"
 
-## -- git_fetch() ------------------------------------------------- #
+	local EGIT_CLONE_DIR oldsha1 cursha1
 
-git_fetch() {
+	# choose if user wants elog or just einfo.
+	if [[ ${EGIT_QUIET} != OFF ]]; then
+		elogcmd="einfo"
+	else
+		elogcmd="elog"
+	fi
 
-	local EGIT_CLONE_DIR
+	# If we have same branch and the tree we can do --depth 1 clone
+	# which outputs into really smaller data transfers.
+	# Sadly we can do shallow copy for now because quite few packages need .git
+	# folder.
+	#[[ ${EGIT_TREE} = ${EGIT_BRANCH} ]] && \
+	#	EGIT_FETCH_CMD="${EGIT_FETCH_CMD} --depth 1"
 
 	# EGIT_REPO_URI is empty.
 	[[ -z ${EGIT_REPO_URI} ]] && die "${EGIT}: EGIT_REPO_URI is empty."
@@ -164,14 +155,13 @@
 	# check for the protocol or pull from a local repo.
 	if [[ -z ${EGIT_REPO_URI%%:*} ]] ; then
 		case ${EGIT_REPO_URI%%:*} in
-			git*|http|https|rsync|ssh)
-				;;
-			*)
-				die "${EGIT}: fetch from "${EGIT_REPO_URI%:*}" is not yet implemented."
-				;;
+			git*|http|https|rsync|ssh) ;;
+			*) die "${EGIT}: protocol for fetch from "${EGIT_REPO_URI%:*}" is not yet implemented in eclass." ;;
 		esac
 	fi
 
+	# initial clone, we have to create master git storage directory and play
+	# nicely with sandbox
 	if [[ ! -d ${EGIT_STORE_DIR} ]] ; then
 		debug-print "${FUNCNAME}: initial clone. creating git directory"
 		addwrite /
@@ -183,122 +173,162 @@
 	cd -P "${EGIT_STORE_DIR}" || die "${EGIT}: can't chdir to ${EGIT_STORE_DIR}"
 	EGIT_STORE_DIR=${PWD}
 
-	# every time
+	# allow writing into EGIT_STORE_DIR
 	addwrite "${EGIT_STORE_DIR}"
 
 	[[ -z ${EGIT_REPO_URI##*/} ]] && EGIT_REPO_URI="${EGIT_REPO_URI%/}"
 	EGIT_CLONE_DIR="${EGIT_PROJECT}"
 
-	# determine whether to perform shallow clone
-	local EGIT_FETCH_OPTS
-	if [[ ${EGIT_BRANCH} = ${EGIT_TREE} ]] && [[ ${EGIT_BRANCH} = master ]] ; then
-		EGIT_FETCH_OPTS="--depth 1"
-	fi
-
 	debug-print "${FUNCNAME}: EGIT_OPTIONS = \"${EGIT_OPTIONS}\""
 
 	export GIT_DIR="${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
 
 	if [[ ! -d ${EGIT_CLONE_DIR} ]] ; then
 		# first clone
-		einfo "git clone start -->"
-		einfo "   repository: ${EGIT_REPO_URI}"
+		${elogcmd} "GIT NEW clone -->"
+		${elogcmd} "   repository: 		${EGIT_REPO_URI}"
 
-		${EGIT_FETCH_CMD} ${EGIT_FETCH_OPTS} ${EGIT_OPTIONS} "${EGIT_REPO_URI}" ${EGIT_PROJECT} \
+		${EGIT_FETCH_CMD} ${EGIT_OPTIONS} "${EGIT_REPO_URI}" ${EGIT_PROJECT} \
 			|| die "${EGIT}: can't fetch from ${EGIT_REPO_URI}."
 
+		oldsha1=$(git rev-parse ${EGIT_BRANCH})
+		${elogcmd} "   at the commit:		${oldsha1}"
+
 		# We use --bare cloning, so git doesn't do this for us.
 		git config remote.origin.url "${EGIT_REPO_URI}"
 	elif [[ -n ${EGIT_OFFLINE} ]] ; then
-		local oldsha1=$(git rev-parse ${EGIT_BRANCH})
-		einfo "git update offline mode -->"
-		einfo "   repository: ${EGIT_REPO_URI}"
-		einfo "   commit: ${oldsha1}"
+		oldsha1=$(git rev-parse ${EGIT_BRANCH})
+		${elogcmd} "GIT offline update -->"
+		${elogcmd} "   repository: 		${EGIT_REPO_URI}"
+		${elogcmd} "   at the commit:		${oldsha1}"
 	else
 		# Git urls might change, so unconditionally set it here
 		git config remote.origin.url "${EGIT_REPO_URI}"
 
 		# fetch updates
-		einfo "git update start -->"
-		einfo "   repository: ${EGIT_REPO_URI}"
+		${elogcmd} "GIT update -->"
+		${elogcmd} "   repository: 		${EGIT_REPO_URI}"
 
-		local oldsha1=$(git rev-parse ${EGIT_BRANCH})
+		oldsha1=$(git rev-parse ${EGIT_BRANCH})
 
 		${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} origin ${EGIT_BRANCH}:${EGIT_BRANCH} \
 			|| die "${EGIT}: can't update from ${EGIT_REPO_URI}."
 
+		cursha1=$(git rev-parse ${EGIT_BRANCH})
+
+		# write out message based on the revisions
+		if [[ ${oldsha1} != ${cursha1} ]]; then
+			${elogcmd} "   updating from commit:	${oldsha1}"
+			${elogcmd} "   to commit:		${cursha1}"
+		else
+			${elogcmd} "   at the commit: 		${cursha1}"
+		fi
 		# piping through cat is needed to avoid a stupid Git feature
 		${EGIT_DIFFSTAT_CMD} ${oldsha1}..${EGIT_BRANCH} | cat
 	fi
 
-	einfo "   local clone: ${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
-
 	if ${EGIT_REPACK} || ${EGIT_PRUNE} ; then
 		ebegin "Garbage collecting the repository"
 		git gc $(${EGIT_PRUNE} && echo '--prune')
 		eend $?
 	fi
 
-	einfo "   committish: ${EGIT_TREE}"
+	[[ ${EGIT_TREE} != ${EGIT_BRANCH} ]] && elog "   tree:			${EGIT_TREE}"
+	${elogcmd} "   branch: 			${EGIT_BRANCH}"
+	${elogcmd} "   storage directory: 	\"${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}\""
 
 	# export to the ${WORKDIR}
 	mkdir -p "${S}"
+
+	# git data are used in some packages for various variables definition. So we
+	# copy also .git folder.
+	pushd "${S}" > /dev/null
+	git clone --bare ${EGIT_STORE_DIR}/${EGIT_CLONE_DIR} .git
+	popd > /dev/null
+
 	git archive --format=tar ${EGIT_TREE} | ( cd "${S}" ; tar xf - )
 
 	echo ">>> Unpacked to ${S}"
-
 }
 
-
-## -- git_bootstrap() ------------------------------------------------ #
-
+# @FUNCTION: git_bootstrap
+# @DESCRIPTION:
+# Runs bootstrap command if EGIT_BOOTSTRAP variable contains some value
+# Remember that what ever gets to the EGIT_BOOTSTRAP variable gets evaled by bash.
 git_bootstrap() {
+	debug-print-function ${FUNCNAME} "$@"
 
-	local patch lpatch
-
-	cd "${S}"
-
-	if [[ -n ${EGIT_PATCHES} ]] ; then
-		einfo "apply patches -->"
+	if [[ -n ${EGIT_BOOTSTRAP} ]] ; then
+		pushd "${S}" > /dev/null
+		einfo "Starting bootstrap"
 
-		for patch in ${EGIT_PATCHES} ; do
-			if [[ -f ${patch} ]] ; then
-				epatch ${patch}
+		if [[ -f ${EGIT_BOOTSTRAP} ]]; then
+			# we have file in the repo which we should execute
+			debug-print "$FUNCNAME: bootstraping with file \"${EGIT_BOOTSTRAP}\""
+
+			if [[ -x ${EGIT_BOOTSTRAP} ]]; then
+				eval "./${EGIT_BOOTSTRAP}" \
+					|| die "${EGIT}: bootstrap script failed"
 			else
-				for lpatch in "${FILESDIR}"/${patch} ; do
-					if [[ -f ${lpatch} ]] ; then
-						epatch ${lpatch}
-					else
-						die "${EGIT}: ${patch} is not found"
-					fi
-				done
+				eerror "\"${EGIT_BOOTSTRAP}\" is not executable."
+				eerror "Report upstream, or bug ebuild maintainer to remove bootstrap command."
+				die "${EGIT}: \"${EGIT_BOOTSTRAP}\" is not executable."
 			fi
-		done
-		echo
-	fi
-
-	if [[ -n ${EGIT_BOOTSTRAP} ]] ; then
-		einfo "begin bootstrap -->"
-
-		if [[ -f ${EGIT_BOOTSTRAP} ]] && [[ -x ${EGIT_BOOTSTRAP} ]] ; then
-			einfo "   bootstrap with a file: ${EGIT_BOOTSTRAP}"
-			eval "./${EGIT_BOOTSTRAP}" \
-				|| die "${EGIT}: can't execute EGIT_BOOTSTRAP."
 		else
-			einfo "   bootstrap with commands: ${EGIT_BOOTSTRAP}"
+			# we execute some system command
+			debug-print "$FUNCNAME: bootstraping with commands \"${EGIT_BOOTSTRAP}\""
+
 			eval "${EGIT_BOOTSTRAP}" \
-				|| die "${EGIT}: can't eval EGIT_BOOTSTRAP."
+				|| die "${EGIT}: bootstrap commands failed."
+
 		fi
-	fi
 
+		einfo "Bootstrap finished"
+		popd > /dev/null
+	fi
 }
 
+# @FUNCTION: git_apply_patches
+# @DESCRIPTION:
+# Apply patches from EGIT_PATCHES bash array.
+# Preffered is using the variable as bash array but for now it allows to write
+# it also as normal space separated string list. (This part of code should be
+# removed when all ebuilds get converted on bash array).
+git_apply_patches() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	pushd "${S}" > /dev/null
+	if [[ ${#EGIT_PATCHES[@]} -gt 1 ]] ; then
+		for i in "${EGIT_PATCHES[@]}"; do
+			debug-print "$FUNCNAME: git_autopatch: patching from ${i}"
+			epatch "${i}"
+		done
+	elif [[ ${EGIT_PATCHES} != "" ]]; then
+		# no need for loop if space separated string is passed.
+		debug-print "$FUNCNAME: git_autopatch: patching from ${EGIT_PATCHES}"
+		epatch "${EGIT_PATCHES}"
+	fi
 
-## -- git_src_unpack() ------------------------------------------------ #
+	popd > /dev/null
+}
 
+# @FUNCTION: git_src_unpack
+# @DESCRIPTION:
+# src_upack function, calls src_prepare one if EAPI!=2.
 git_src_unpack() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	git_fetch || die "${EGIT}: unknown problem in git_fetch()."
 
-	git_fetch     || die "${EGIT}: unknown problem in git_fetch()."
-	git_bootstrap || die "${EGIT}: unknown problem in git_bootstrap()."
+	has src_prepare ${EXPORTED_FUNCTIONS} || git_src_prepare
+}
+
+# @FUNCTION: git_src_prepare
+# @DESCRIPTION:
+# src_prepare function for git stuff. Patches, bootstrap...
+git_src_prepare() {
+	debug-print-function ${FUNCNAME} "$@"
 
+	git_apply_patches
+	git_bootstrap
 }






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-04-06  0:00 Robin H. Johnson (robbat2)
  0 siblings, 0 replies; 48+ messages in thread
From: Robin H. Johnson (robbat2) @ 2009-04-06  0:00 UTC (permalink / raw
  To: gentoo-commits

robbat2     09/04/06 00:00:47

  Modified:             git.eclass
  Log:
  If you just pass --no-pager to git, you can avoid the need to pipe to cat.

Revision  Changes    Path
1.18                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.18&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.18&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.17&r2=1.18

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.17
retrieving revision 1.18
diff -p -w -b -B -u -u -r1.17 -r1.18
--- git.eclass	5 Apr 2009 20:22:15 -0000	1.17
+++ git.eclass	6 Apr 2009 00:00:47 -0000	1.18
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.17 2009/04/05 20:22:15 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.18 2009/04/06 00:00:47 robbat2 Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -56,7 +56,7 @@ EGIT_UPDATE_CMD="git fetch -f -u"
 # @ECLASS-VARIABLE: EGIT_DIFFSTAT_CMD
 # @DESCRIPTION:
 # Git command for diffstat.
-EGIT_DIFFSTAT_CMD="git diff --stat"
+EGIT_DIFFSTAT_CMD="git --no-pager diff --stat"
 
 # @ECLASS-VARIABLE: EGIT_OPTIONS
 # @DESCRIPTION:
@@ -224,7 +224,7 @@ git_fetch() {
 			${elogcmd} "   at the commit: 		${cursha1}"
 		fi
 		# piping through cat is needed to avoid a stupid Git feature
-		${EGIT_DIFFSTAT_CMD} ${oldsha1}..${EGIT_BRANCH} | cat
+		${EGIT_DIFFSTAT_CMD} ${oldsha1}..${EGIT_BRANCH}
 	fi
 
 	if ${EGIT_REPACK} || ${EGIT_PRUNE} ; then






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-04-06 20:47 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-04-06 20:47 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/04/06 20:47:10

  Modified:             git.eclass
  Log:
  Fix typo. Thanks Caster for spoting.

Revision  Changes    Path
1.19                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.19&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.19&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.18&r2=1.19

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- git.eclass	6 Apr 2009 00:00:47 -0000	1.18
+++ git.eclass	6 Apr 2009 20:47:09 -0000	1.19
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.18 2009/04/06 00:00:47 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.19 2009/04/06 20:47:09 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -20,7 +20,7 @@
 
 EXPORTED_FUNCTIONS="src_unpack"
 case "${EAPI:-0}" in
-	2) EXPORT_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;;
+	2) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;;
 	0|1) ;;
 	*) die "Unknown EAPI, Bug eclass maintainers." ;;
 esac






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-04-07 14:39 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-04-07 14:39 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/04/07 14:39:32

  Modified:             git.eclass
  Log:
  Fix a typo. Z vs S :] Thanks reavertm for spoting.

Revision  Changes    Path
1.20                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.20&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.20&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.19&r2=1.20

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- git.eclass	6 Apr 2009 20:47:09 -0000	1.19
+++ git.eclass	7 Apr 2009 14:39:32 -0000	1.20
@@ -1,12 +1,12 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.19 2009/04/06 20:47:09 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.20 2009/04/07 14:39:32 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
 # Tomas Chvatal <scarabeus@gentoo.org>
 # Donnie Berkholz <dberkholz@gentoo.org>
-# @BLURB: This eclass provides functions for fetch and unpack git repozitories
+# @BLURB: This eclass provides functions for fetch and unpack git repositories
 # @DESCRIPTION:
 # The eclass is based on subversion eclass.
 # If you use this eclass, the ${S} is ${WORKDIR}/${P}.






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-04-07 15:03 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-04-07 15:03 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/04/07 15:03:32

  Modified:             git.eclass
  Log:
  Add working migration for shallow copy repositories. We cant keep it around showing errors.

Revision  Changes    Path
1.21                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.21&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.21&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.20&r2=1.21

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- git.eclass	7 Apr 2009 14:39:32 -0000	1.20
+++ git.eclass	7 Apr 2009 15:03:32 -0000	1.21
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.20 2009/04/07 14:39:32 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.21 2009/04/07 15:03:32 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -46,7 +46,7 @@
 # @ECLASS-VARIABLE: EGIT_FETCH_CMD
 # @DESCRIPTION:
 # Command for cloning the repository.
-EGIT_FETCH_CMD="git clone --bare"
+: ${EGIT_FETCH_CMD:="git clone --bare"}
 
 # @ECLASS-VARIABLE: EGIT_UPDATE_CMD
 # @DESCRIPTION:
@@ -144,7 +144,7 @@
 
 	# If we have same branch and the tree we can do --depth 1 clone
 	# which outputs into really smaller data transfers.
-	# Sadly we can do shallow copy for now because quite few packages need .git
+	# Sadly we can do shallow copy for now because quite a few packages need .git
 	# folder.
 	#[[ ${EGIT_TREE} = ${EGIT_BRANCH} ]] && \
 	#	EGIT_FETCH_CMD="${EGIT_FETCH_CMD} --depth 1"
@@ -183,6 +183,13 @@
 
 	export GIT_DIR="${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
 
+	# we also have to remove all shallow copied repositories
+	# and fetch them again
+	if [[ -e "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}/shallow" ]]; then
+		rm -rf "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
+		einfo "The ${EGIT_CLONE_DIR} was shallow copy. Refetching."
+	fi
+
 	if [[ ! -d ${EGIT_CLONE_DIR} ]] ; then
 		# first clone
 		${elogcmd} "GIT NEW clone -->"
@@ -223,7 +230,6 @@
 		else
 			${elogcmd} "   at the commit: 		${cursha1}"
 		fi
-		# piping through cat is needed to avoid a stupid Git feature
 		${EGIT_DIFFSTAT_CMD} ${oldsha1}..${EGIT_BRANCH}
 	fi
 






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-04-08 16:46 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-04-08 16:46 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/04/08 16:46:34

  Modified:             git.eclass
  Log:
  Apply patches from PATCHES variable too in git eclass. Now it was applying only EGIT_PATCHES.

Revision  Changes    Path
1.22                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.22&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.22&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.21&r2=1.22

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- git.eclass	7 Apr 2009 15:03:32 -0000	1.21
+++ git.eclass	8 Apr 2009 16:46:34 -0000	1.22
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.21 2009/04/07 15:03:32 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.22 2009/04/08 16:46:34 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -14,7 +14,7 @@
 # @THANKS TO:
 # Fernando J. Pereda <ferdy@gentoo.org>
 
-inherit eutils
+inherit eutils base
 
 EGIT="git.eclass"
 
@@ -334,7 +334,10 @@
 # src_prepare function for git stuff. Patches, bootstrap...
 git_src_prepare() {
 	debug-print-function ${FUNCNAME} "$@"
-
+	
+	# apply EGIT_PATCHES
 	git_apply_patches
+	# apply patches from PATCHES array too
+	base_src_prepare
 	git_bootstrap
 }






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-04-10 19:33 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-04-10 19:33 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/04/10 19:33:03

  Modified:             git.eclass
  Log:
  Update the unpack to actualy extract correct .git folder. Thanks to robbat2 for help with this.

Revision  Changes    Path
1.23                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.23&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.23&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.22&r2=1.23

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- git.eclass	8 Apr 2009 16:46:34 -0000	1.22
+++ git.eclass	10 Apr 2009 19:33:03 -0000	1.23
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.22 2009/04/08 16:46:34 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.23 2009/04/10 19:33:03 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -112,7 +112,7 @@
 
 # @ECLASS-VARIABLE: EGIT_TREE
 # @DESCRIPTION:
-# git eclass can checkout any tree.
+# git eclass can checkout any tree (commit).
 : ${EGIT_TREE:=${EGIT_BRANCH}}
 
 # @ECLASS-VARIABLE: EGIT_REPACK
@@ -243,16 +243,23 @@
 	${elogcmd} "   branch: 			${EGIT_BRANCH}"
 	${elogcmd} "   storage directory: 	\"${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}\""
 
-	# export to the ${WORKDIR}
-	mkdir -p "${S}"
-
-	# git data are used in some packages for various variables definition. So we
-	# copy also .git folder.
+	# unpack to the ${S}
+	unset GIT_DIR
+	debug-print "git clone -l -s -n \"${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}\" \"${S}\""
+	git clone -l -s -n "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" "${S}"
+	
+	# set correct branch and the tree ebuild specified
 	pushd "${S}" > /dev/null
-	git clone --bare ${EGIT_STORE_DIR}/${EGIT_CLONE_DIR} .git
+	local branchname=branch-${EGIT_BRANCH} src=origin/${EGIT_BRANCH}
+	if [[ ${EGIT_TREE} != ${EGIT_BRANCH} ]]; then
+		branchname=tree-${EGIT_TREE}
+		src=${EGIT_TREE}
+	fi
+	debug-print "git checkout -b ${branchname} ${src}"
+	git checkout -b ${branchname} ${src} 2>&1 > /dev/null
 	popd > /dev/null
 
-	git archive --format=tar ${EGIT_TREE} | ( cd "${S}" ; tar xf - )
+	unset branchname src
 
 	echo ">>> Unpacked to ${S}"
 }






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-04-13 15:35 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-04-13 15:35 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/04/13 15:35:58

  Modified:             git.eclass
  Log:
  Fix issues with patches being applied twice. Remember that we should let other eclasses handle the PATCHES array. We have our own array for that :]

Revision  Changes    Path
1.24                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.24&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.24&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.23&r2=1.24

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- git.eclass	10 Apr 2009 19:33:03 -0000	1.23
+++ git.eclass	13 Apr 2009 15:35:58 -0000	1.24
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.23 2009/04/10 19:33:03 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.24 2009/04/13 15:35:58 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -342,9 +342,6 @@
 git_src_prepare() {
 	debug-print-function ${FUNCNAME} "$@"
 	
-	# apply EGIT_PATCHES
 	git_apply_patches
-	# apply patches from PATCHES array too
-	base_src_prepare
 	git_bootstrap
 }






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-04-14 21:46 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-04-14 21:46 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/04/14 21:46:45

  Modified:             git.eclass
  Log:
  Remove sliped inherit base from the previous fixing breakage :[

Revision  Changes    Path
1.25                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.25&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.25&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.24&r2=1.25

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- git.eclass	13 Apr 2009 15:35:58 -0000	1.24
+++ git.eclass	14 Apr 2009 21:46:45 -0000	1.25
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.24 2009/04/13 15:35:58 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.25 2009/04/14 21:46:45 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -14,7 +14,7 @@
 # @THANKS TO:
 # Fernando J. Pereda <ferdy@gentoo.org>
 
-inherit eutils base
+inherit eutils
 
 EGIT="git.eclass"
 






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-05-09 15:10 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-05-09 15:10 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/05/09 15:10:47

  Modified:             git.eclass
  Log:
  export EGIT_VERSION. Per bug #268622.

Revision  Changes    Path
1.26                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.26&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.26&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.25&r2=1.26

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- git.eclass	14 Apr 2009 21:46:45 -0000	1.25
+++ git.eclass	9 May 2009 15:10:47 -0000	1.26
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.25 2009/04/14 21:46:45 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.26 2009/05/09 15:10:47 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -198,16 +198,15 @@
 		${EGIT_FETCH_CMD} ${EGIT_OPTIONS} "${EGIT_REPO_URI}" ${EGIT_PROJECT} \
 			|| die "${EGIT}: can't fetch from ${EGIT_REPO_URI}."
 
-		oldsha1=$(git rev-parse ${EGIT_BRANCH})
-		${elogcmd} "   at the commit:		${oldsha1}"
-
+		cursha1=$(git rev-parse ${EGIT_BRANCH})
+		${elogcmd} "   at the commit:		${cursha1}"
 		# We use --bare cloning, so git doesn't do this for us.
 		git config remote.origin.url "${EGIT_REPO_URI}"
 	elif [[ -n ${EGIT_OFFLINE} ]] ; then
-		oldsha1=$(git rev-parse ${EGIT_BRANCH})
+		cursha1=$(git rev-parse ${EGIT_BRANCH})
 		${elogcmd} "GIT offline update -->"
 		${elogcmd} "   repository: 		${EGIT_REPO_URI}"
-		${elogcmd} "   at the commit:		${oldsha1}"
+		${elogcmd} "   at the commit:		${cursha1}"
 	else
 		# Git urls might change, so unconditionally set it here
 		git config remote.origin.url "${EGIT_REPO_URI}"
@@ -238,6 +237,9 @@
 		git gc $(${EGIT_PRUNE} && echo '--prune')
 		eend $?
 	fi
+	
+	# export the git version
+	export EGIT_VERSION="${cursha1}"
 
 	[[ ${EGIT_TREE} != ${EGIT_BRANCH} ]] && elog "   tree:			${EGIT_TREE}"
 	${elogcmd} "   branch: 			${EGIT_BRANCH}"






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-05-14 13:52 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-05-14 13:52 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/05/14 13:52:08

  Modified:             git.eclass
  Log:
  Allow redefinition of git storage dir. Per jilec request on irc. I cant think of any harm from this, so commiting.

Revision  Changes    Path
1.27                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.27&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.27&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.26&r2=1.27

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- git.eclass	9 May 2009 15:10:47 -0000	1.26
+++ git.eclass	14 May 2009 13:52:08 -0000	1.27
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.26 2009/05/09 15:10:47 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.27 2009/05/14 13:52:08 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -41,7 +41,8 @@
 # @ECLASS-VARIABLE: EGIT_STORE_DIR
 # @DESCRIPTION:
 # Storage directory for git sources.
-EGIT_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/git-src"
+# Can be redefined.
+[[ -z ${EGIT_STORE_DIR} ]] && EGIT_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/git-src"
 
 # @ECLASS-VARIABLE: EGIT_FETCH_CMD
 # @DESCRIPTION:






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-08-24 21:48 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-08-24 21:48 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/08/24 21:48:58

  Modified:             git.eclass
  Log:
  Update git eclass from x11 overlay.
  FEATURES
  * git submodule support
  * LIVE_FAIL_FETCH_IF_REPO_NOT_UPDATED usage
    - this makes build die when git repo is up-to-date and nothing new
      has been done in it. Quite lovely with --keep-going.
  * specific per overrides of TREE/BRANCH/REPO
    - just define ${PN//-/_}_LIVE_TREE/BRANCH/REPO in enviroment and you can
      override in ebuild values.

Revision  Changes    Path
1.28                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.28&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.28&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.27&r2=1.28

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- git.eclass	14 May 2009 13:52:08 -0000	1.27
+++ git.eclass	24 Aug 2009 21:48:58 -0000	1.28
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.27 2009/05/14 13:52:08 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.28 2009/08/24 21:48:58 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -75,8 +75,12 @@
 #   git+ssh://
 #   rsync://
 #   ssh://
-: ${EGIT_REPO_URI:=}
-
+eval X="\$${PN//-/_}_LIVE_REPO"
+if [[ ${X} = "" ]]; then
+	EGIT_REPO_URI=${EGIT_REPO_URI:=}
+else
+	EGIT_REPO_URI="${X}"
+fi
 # @ECLASS-VARIABLE: EGIT_PROJECT
 # @DESCRIPTION:
 # Project name of your ebuild.
@@ -109,12 +113,22 @@
 # @ECLASS-VARIABLE: EGIT_BRANCH
 # @DESCRIPTION:
 # git eclass can fetch any branch in git_fetch().
-: ${EGIT_BRANCH:=master}
+eval X="\$${PN//-/_}_LIVE_BRANCH"
+if [[ ${X} = "" ]]; then
+	EGIT_BRANCH=${EGIT_BRANCH:=master}
+else
+	EGIT_BRANCH="${X}"
+fi
 
 # @ECLASS-VARIABLE: EGIT_TREE
 # @DESCRIPTION:
 # git eclass can checkout any tree (commit).
-: ${EGIT_TREE:=${EGIT_BRANCH}}
+eval X="\$${PN//-/_}_LIVE_TREE"
+if [[ ${X} = "" ]]; then
+	: ${EGIT_TREE:=${EGIT_BRANCH}}
+else
+	EGIT_TREE="${X}"
+fi
 
 # @ECLASS-VARIABLE: EGIT_REPACK
 # @DESCRIPTION:
@@ -218,6 +232,7 @@
 
 		oldsha1=$(git rev-parse ${EGIT_BRANCH})
 
+		${elogcmd} ${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} origin ${EGIT_BRANCH}:${EGIT_BRANCH}
 		${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} origin ${EGIT_BRANCH}:${EGIT_BRANCH} \
 			|| die "${EGIT}: can't update from ${EGIT_REPO_URI}."
 
@@ -229,6 +244,16 @@
 			${elogcmd} "   to commit:		${cursha1}"
 		else
 			${elogcmd} "   at the commit: 		${cursha1}"
+			# @ECLASS_VARIABLE: LIVE_FAIL_FETCH_IF_REPO_NOT_UPDATED
+			# @DESCRIPTION:
+			# If this variable is set to TRUE in make.conf or somewhere in
+			# enviroment the package will fail if there is no update, thus in
+			# combination with --keep-going it would lead in not-updating
+			# pakcages that are up-to-date.
+			# TODO: this can lead to issues if more projects/packages use same repo
+			[[ ${LIVE_FAIL_FETCH_IF_REPO_NOT_UPDATED} = true ]] && \
+				debug-print "${FUNCNAME}: Repository \"${EGIT_REPO_URI}\" is up-to-date. Skipping." && \
+				die "${EGIT}: Repository \"${EGIT_REPO_URI}\" is up-to-date. Skipping."
 		fi
 		${EGIT_DIFFSTAT_CMD} ${oldsha1}..${EGIT_BRANCH}
 	fi
@@ -260,6 +285,10 @@
 	fi
 	debug-print "git checkout -b ${branchname} ${src}"
 	git checkout -b ${branchname} ${src} 2>&1 > /dev/null
+	debug-print "git submodule init"
+	git submodule init 2>&1 > /dev/null
+	debug-print "git submodule update"
+	git submodule update 2>&1 > /dev/null
 	popd > /dev/null
 
 	unset branchname src






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-09-04  8:00 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-09-04  8:00 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/09/04 08:00:23

  Modified:             git.eclass
  Log:
  Adjust git.eclass to support packages with + in their name (gtk+,...). Per bug #283436. Thanks to gseba for the patch.

Revision  Changes    Path
1.29                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.29&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.29&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.28&r2=1.29

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- git.eclass	24 Aug 2009 21:48:58 -0000	1.28
+++ git.eclass	4 Sep 2009 08:00:23 -0000	1.29
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.28 2009/08/24 21:48:58 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.29 2009/09/04 08:00:23 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -75,7 +75,7 @@
 #   git+ssh://
 #   rsync://
 #   ssh://
-eval X="\$${PN//-/_}_LIVE_REPO"
+eval X="\$${PN//[-+]/_}_LIVE_REPO"
 if [[ ${X} = "" ]]; then
 	EGIT_REPO_URI=${EGIT_REPO_URI:=}
 else
@@ -113,7 +113,7 @@
 # @ECLASS-VARIABLE: EGIT_BRANCH
 # @DESCRIPTION:
 # git eclass can fetch any branch in git_fetch().
-eval X="\$${PN//-/_}_LIVE_BRANCH"
+eval X="\$${PN//[-+]/_}_LIVE_BRANCH"
 if [[ ${X} = "" ]]; then
 	EGIT_BRANCH=${EGIT_BRANCH:=master}
 else
@@ -123,7 +123,7 @@
 # @ECLASS-VARIABLE: EGIT_TREE
 # @DESCRIPTION:
 # git eclass can checkout any tree (commit).
-eval X="\$${PN//-/_}_LIVE_TREE"
+eval X="\$${PN//[-+]/_}_LIVE_TREE"
 if [[ ${X} = "" ]]; then
 	: ${EGIT_TREE:=${EGIT_BRANCH}}
 else






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-10-11 11:40 Markus Meier (maekke)
  0 siblings, 0 replies; 48+ messages in thread
From: Markus Meier (maekke) @ 2009-10-11 11:40 UTC (permalink / raw
  To: gentoo-commits

maekke      09/10/11 11:40:54

  Modified:             git.eclass
  Log:
  whitespace

Revision  Changes    Path
1.30                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.30&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.30&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.29&r2=1.30

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- git.eclass	4 Sep 2009 08:00:23 -0000	1.29
+++ git.eclass	11 Oct 2009 11:40:53 -0000	1.30
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.29 2009/09/04 08:00:23 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.30 2009/10/11 11:40:53 maekke Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -263,7 +263,7 @@
 		git gc $(${EGIT_PRUNE} && echo '--prune')
 		eend $?
 	fi
-	
+
 	# export the git version
 	export EGIT_VERSION="${cursha1}"
 
@@ -275,7 +275,7 @@
 	unset GIT_DIR
 	debug-print "git clone -l -s -n \"${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}\" \"${S}\""
 	git clone -l -s -n "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" "${S}"
-	
+
 	# set correct branch and the tree ebuild specified
 	pushd "${S}" > /dev/null
 	local branchname=branch-${EGIT_BRANCH} src=origin/${EGIT_BRANCH}
@@ -373,7 +373,7 @@
 # src_prepare function for git stuff. Patches, bootstrap...
 git_src_prepare() {
 	debug-print-function ${FUNCNAME} "$@"
-	
+
 	git_apply_patches
 	git_bootstrap
 }






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-10-20 10:05 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-10-20 10:05 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/10/20 10:05:47

  Modified:             git.eclass
  Log:
  Fix typo in eclassdoc. Thx to Boris Petersen for spotting and patch :]

Revision  Changes    Path
1.31                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.31&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.31&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.30&r2=1.31

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- git.eclass	11 Oct 2009 11:40:53 -0000	1.30
+++ git.eclass	20 Oct 2009 10:05:47 -0000	1.31
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.30 2009/10/11 11:40:53 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.31 2009/10/20 10:05:47 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -92,7 +92,7 @@
 #	${EGIT_STORE_DIR}/subversion
 : ${EGIT_PROJECT:=${PN/-git}}
 
-# @ECLASS-VARIABLE: EGIT_BOOSTRAP
+# @ECLASS-VARIABLE: EGIT_BOOTSTRAP
 # @DESCRIPTION:
 # bootstrap script or command like autogen.sh or etc...
 : ${EGIT_BOOTSTRAP:=}






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-12-16 20:35 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-12-16 20:35 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/12/16 20:35:38

  Modified:             git.eclass
  Log:
  Add support for git submodules. Per bug #269491.

Revision  Changes    Path
1.32                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.32&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.32&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.31&r2=1.32

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- git.eclass	20 Oct 2009 10:05:47 -0000	1.31
+++ git.eclass	16 Dec 2009 20:35:38 -0000	1.32
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.31 2009/10/20 10:05:47 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.32 2009/12/16 20:35:38 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -47,12 +47,12 @@
 # @ECLASS-VARIABLE: EGIT_FETCH_CMD
 # @DESCRIPTION:
 # Command for cloning the repository.
-: ${EGIT_FETCH_CMD:="git clone --bare"}
+: ${EGIT_FETCH_CMD:="git clone"}
 
 # @ECLASS-VARIABLE: EGIT_UPDATE_CMD
 # @DESCRIPTION:
 # Git fetch command.
-EGIT_UPDATE_CMD="git fetch -f -u"
+EGIT_UPDATE_CMD="git pull -f -u"
 
 # @ECLASS-VARIABLE: EGIT_DIFFSTAT_CMD
 # @DESCRIPTION:
@@ -120,14 +120,14 @@
 	EGIT_BRANCH="${X}"
 fi
 
-# @ECLASS-VARIABLE: EGIT_TREE
+# @ECLASS-VARIABLE: EGIT_COMMIT
 # @DESCRIPTION:
-# git eclass can checkout any tree (commit).
-eval X="\$${PN//[-+]/_}_LIVE_TREE"
+# git eclass can checkout any commit.
+eval X="\$${PN//[-+]/_}_LIVE_COMMIT"
 if [[ ${X} = "" ]]; then
-	: ${EGIT_TREE:=${EGIT_BRANCH}}
+	: ${EGIT_COMMIT:=${EGIT_BRANCH}}
 else
-	EGIT_TREE="${X}"
+	EGIT_COMMIT="${X}"
 fi
 
 # @ECLASS-VARIABLE: EGIT_REPACK
@@ -138,17 +138,27 @@
 
 # @ECLASS-VARIABLE: EGIT_PRUNE
 # @DESCRIPTION:
-# git.eclass can prune the local clone. This is useful if upstream rewinds and
+# git eclass can prune the local clone. This is useful if upstream rewinds and
 # rebases branches too often.
 : ${EGIT_PRUNE:=false}
 
+# @FUNCTION: git_submodules
+# @DESCRIPTION:
+# Internal function wrapping the submodule initialisation and update
+git_sumbodules() {
+	debug-print "git submodule init"
+	git submodule init
+	debug-print "git submodule update"
+	git submodule update
+}
+
 # @FUNCTION: git_fetch
 # @DESCRIPTION:
 # Gets repository from EGIT_REPO_URI and store it in specified EGIT_STORE_DIR
 git_fetch() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	local EGIT_CLONE_DIR oldsha1 cursha1
+	local GIT_DIR EGIT_CLONE_DIR oldsha1 cursha1
 
 	# choose if user wants elog or just einfo.
 	if [[ ${EGIT_QUIET} != OFF ]]; then
@@ -161,8 +171,13 @@
 	# which outputs into really smaller data transfers.
 	# Sadly we can do shallow copy for now because quite a few packages need .git
 	# folder.
-	#[[ ${EGIT_TREE} = ${EGIT_BRANCH} ]] && \
+	#[[ ${EGIT_COMMIT} = ${EGIT_BRANCH} ]] && \
 	#	EGIT_FETCH_CMD="${EGIT_FETCH_CMD} --depth 1"
+	if [[ ! -z ${EGIT_TREE} ]] ; then
+		EGIT_COMMIT=${EGIT_TREE}
+		eqawarn "Usage of deprecated EGIT_TREE variable detected."
+		eqawarn "Use EGIT_COMMIT variable instead."
+	fi
 
 	# EGIT_REPO_URI is empty.
 	[[ -z ${EGIT_REPO_URI} ]] && die "${EGIT}: EGIT_REPO_URI is empty."
@@ -196,47 +211,59 @@
 
 	debug-print "${FUNCNAME}: EGIT_OPTIONS = \"${EGIT_OPTIONS}\""
 
-	export GIT_DIR="${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
-
+	GIT_DIR="${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
+	pushd ${EGIT_STORE_DIR} &> /dev/null
 	# we also have to remove all shallow copied repositories
 	# and fetch them again
-	if [[ -e "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}/shallow" ]]; then
-		rm -rf "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
+	if [[ -e "${GIT_DIR}/shallow" ]]; then
+		rm -rf "${GIT_DIR}"
 		einfo "The ${EGIT_CLONE_DIR} was shallow copy. Refetching."
 	fi
+	# repack from bare copy to normal one
+	if [[ -d ${GIT_DIR} && ! -d "${GIT_DIR}/.git/" ]]; then
+		rm -rf "${GIT_DIR}"
+		einfo "The ${EGIT_CLONE_DIR} was bare copy. Refetching."
+	fi
 
-	if [[ ! -d ${EGIT_CLONE_DIR} ]] ; then
+	if [[ ! -d ${GIT_DIR} ]] ; then
 		# first clone
 		${elogcmd} "GIT NEW clone -->"
 		${elogcmd} "   repository: 		${EGIT_REPO_URI}"
 
-		${EGIT_FETCH_CMD} ${EGIT_OPTIONS} "${EGIT_REPO_URI}" ${EGIT_PROJECT} \
+		debug-print "${EGIT_FETCH_CMD} ${EGIT_OPTIONS} \"${EGIT_REPO_URI}\" ${GIT_DIR}"
+		${EGIT_FETCH_CMD} ${EGIT_OPTIONS} "${EGIT_REPO_URI}" ${GIT_DIR} \
 			|| die "${EGIT}: can't fetch from ${EGIT_REPO_URI}."
-
-		cursha1=$(git rev-parse ${EGIT_BRANCH})
+		
+		pushd "${GIT_DIR}" &> /dev/null
+		cursha1=$(git rev-parse origin/${EGIT_BRANCH})
 		${elogcmd} "   at the commit:		${cursha1}"
-		# We use --bare cloning, so git doesn't do this for us.
-		git config remote.origin.url "${EGIT_REPO_URI}"
+
+		git_sumbodules
+		popd &> /dev/null
 	elif [[ -n ${EGIT_OFFLINE} ]] ; then
-		cursha1=$(git rev-parse ${EGIT_BRANCH})
+		pushd "${GIT_DIR}" &> /dev/null
+		cursha1=$(git rev-parse origin/${EGIT_BRANCH})
 		${elogcmd} "GIT offline update -->"
 		${elogcmd} "   repository: 		${EGIT_REPO_URI}"
 		${elogcmd} "   at the commit:		${cursha1}"
+		popd &> /dev/null
 	else
+		pushd "${GIT_DIR}" &> /dev/null
 		# Git urls might change, so unconditionally set it here
 		git config remote.origin.url "${EGIT_REPO_URI}"
 
 		# fetch updates
 		${elogcmd} "GIT update -->"
 		${elogcmd} "   repository: 		${EGIT_REPO_URI}"
+		
+		oldsha1=$(git rev-parse origin/${EGIT_BRANCH})
 
-		oldsha1=$(git rev-parse ${EGIT_BRANCH})
-
-		${elogcmd} ${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} origin ${EGIT_BRANCH}:${EGIT_BRANCH}
-		${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} origin ${EGIT_BRANCH}:${EGIT_BRANCH} \
+		debug-print "${EGIT_UPDATE_CMD} ${EGIT_OPTIONS}"
+		${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} \
 			|| die "${EGIT}: can't update from ${EGIT_REPO_URI}."
 
-		cursha1=$(git rev-parse ${EGIT_BRANCH})
+		git_sumbodules
+		cursha1=$(git rev-parse origin/${EGIT_BRANCH})
 
 		# write out message based on the revisions
 		if [[ ${oldsha1} != ${cursha1} ]]; then
@@ -255,40 +282,40 @@
 				debug-print "${FUNCNAME}: Repository \"${EGIT_REPO_URI}\" is up-to-date. Skipping." && \
 				die "${EGIT}: Repository \"${EGIT_REPO_URI}\" is up-to-date. Skipping."
 		fi
-		${EGIT_DIFFSTAT_CMD} ${oldsha1}..${EGIT_BRANCH}
+		${EGIT_DIFFSTAT_CMD} ${oldsha1}..origin/${EGIT_BRANCH}
+		popd &> /dev/null
 	fi
-
+	
+	pushd "${GIT_DIR}" &> /dev/null
 	if ${EGIT_REPACK} || ${EGIT_PRUNE} ; then
 		ebegin "Garbage collecting the repository"
 		git gc $(${EGIT_PRUNE} && echo '--prune')
 		eend $?
 	fi
+	popd &> /dev/null
 
 	# export the git version
 	export EGIT_VERSION="${cursha1}"
 
-	[[ ${EGIT_TREE} != ${EGIT_BRANCH} ]] && elog "   tree:			${EGIT_TREE}"
+	[[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]] && elog "   commit:			${EGIT_COMMIT}"
 	${elogcmd} "   branch: 			${EGIT_BRANCH}"
 	${elogcmd} "   storage directory: 	\"${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}\""
 
 	# unpack to the ${S}
-	unset GIT_DIR
-	debug-print "git clone -l -s -n \"${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}\" \"${S}\""
-	git clone -l -s -n "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" "${S}"
+	popd &> /dev/null
+	debug-print "cp -aR \"${GIT_DIR}\" \"${S}\""
+	cp -aR "${GIT_DIR}" "${S}"
 
 	# set correct branch and the tree ebuild specified
 	pushd "${S}" > /dev/null
 	local branchname=branch-${EGIT_BRANCH} src=origin/${EGIT_BRANCH}
-	if [[ ${EGIT_TREE} != ${EGIT_BRANCH} ]]; then
-		branchname=tree-${EGIT_TREE}
-		src=${EGIT_TREE}
+	if [[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]]; then
+		branchname=tree-${EGIT_COMMIT}
+		src=${EGIT_COMMIT}
 	fi
 	debug-print "git checkout -b ${branchname} ${src}"
 	git checkout -b ${branchname} ${src} 2>&1 > /dev/null
-	debug-print "git submodule init"
-	git submodule init 2>&1 > /dev/null
-	debug-print "git submodule update"
-	git submodule update 2>&1 > /dev/null
+	git_sumbodules
 	popd > /dev/null
 
 	unset branchname src






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2009-12-29 17:18 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-12-29 17:18 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/12/29 17:18:16

  Modified:             git.eclass
  Log:
  Replace cp with git clone (faster, yay)

Revision  Changes    Path
1.33                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.33&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.33&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.32&r2=1.33

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- git.eclass	16 Dec 2009 20:35:38 -0000	1.32
+++ git.eclass	29 Dec 2009 17:18:16 -0000	1.33
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.32 2009/12/16 20:35:38 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.33 2009/12/29 17:18:16 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -304,7 +304,7 @@
 	# unpack to the ${S}
 	popd &> /dev/null
 	debug-print "cp -aR \"${GIT_DIR}\" \"${S}\""
-	cp -aR "${GIT_DIR}" "${S}"
+	git clone "${GIT_DIR}" "${S}"
 
 	# set correct branch and the tree ebuild specified
 	pushd "${S}" > /dev/null






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2010-01-13 20:04 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2010-01-13 20:04 UTC (permalink / raw
  To: gentoo-commits

scarabeus    10/01/13 20:04:19

  Modified:             git.eclass
  Log:
  Revert back to safe values so it does not break stable.

Revision  Changes    Path
1.35                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.35&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.35&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.34&r2=1.35

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- git.eclass	13 Jan 2010 09:51:53 -0000	1.34
+++ git.eclass	13 Jan 2010 20:04:19 -0000	1.35
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.34 2010/01/13 09:51:53 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.35 2010/01/13 20:04:19 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -52,7 +52,7 @@
 # @ECLASS-VARIABLE: EGIT_UPDATE_CMD
 # @DESCRIPTION:
 # Git fetch command.
-EGIT_UPDATE_CMD="git pull -f -u --all"
+EGIT_UPDATE_CMD="git pull -f -u"
 
 # @ECLASS-VARIABLE: EGIT_DIFFSTAT_CMD
 # @DESCRIPTION:
@@ -301,12 +301,10 @@
 	${elogcmd} "   branch: 			${EGIT_BRANCH}"
 	${elogcmd} "   storage directory: 	\"${GIT_DIR}\""
 
-	popd &> /dev/null
-
 	# unpack to the ${S}
-	# "${EGIT_REPO_URI}"
-	debug-print "git clone -l -s -n \"${GIT_DIR}\" \"${S}\""
-	git clone -l -s -n "${GIT_DIR}" "${S}"
+	popd &> /dev/null
+	debug-print "git clone -l \"${GIT_DIR}\" \"${S}\""
+	git clone -l "${GIT_DIR}" "${S}"
 
 	# set correct branch and the tree ebuild specified
 	pushd "${S}" > /dev/null
@@ -317,7 +315,6 @@
 	fi
 	debug-print "git checkout -b ${branchname} ${src}"
 	git checkout -b ${branchname} ${src} 2>&1 > /dev/null
-
 	git_sumbodules
 	popd > /dev/null
 






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2010-01-13 22:15 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2010-01-13 22:15 UTC (permalink / raw
  To: gentoo-commits

scarabeus    10/01/13 22:15:00

  Modified:             git.eclass
  Log:
  Fix that EGIT_TREE and EGIT_BRANCH again, now it looks all fine, fully tested with x11 repos and mainly mesa.

Revision  Changes    Path
1.36                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.36&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.36&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.35&r2=1.36

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- git.eclass	13 Jan 2010 20:04:19 -0000	1.35
+++ git.eclass	13 Jan 2010 22:14:59 -0000	1.36
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.35 2010/01/13 20:04:19 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.36 2010/01/13 22:14:59 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -152,6 +152,22 @@
 	git submodule update
 }
 
+# @FUNCTION: git_branch
+# @DESCRIPTION:
+# Internal function that changes branch for the repo based on EGIT_TREE and
+# EGIT_BRANCH variables.
+git_branch() {
+	local branchname=branch-${EGIT_BRANCH} src=origin/${EGIT_BRANCH}
+	if [[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]]; then
+		branchname=tree-${EGIT_COMMIT}
+		src=${EGIT_COMMIT}
+	fi
+	debug-print "git checkout -b ${branchname} ${src}"
+	git checkout -b ${branchname} ${src} &> /dev/null
+
+	unset branchname src
+}
+
 # @FUNCTION: git_fetch
 # @DESCRIPTION:
 # Gets repository from EGIT_REPO_URI and store it in specified EGIT_STORE_DIR
@@ -238,6 +254,7 @@
 		cursha1=$(git rev-parse origin/${EGIT_BRANCH})
 		${elogcmd} "   at the commit:		${cursha1}"
 
+		git_branch
 		git_sumbodules
 		popd &> /dev/null
 	elif [[ -n ${EGIT_OFFLINE} ]] ; then
@@ -262,6 +279,7 @@
 		${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} \
 			|| die "${EGIT}: can't update from ${EGIT_REPO_URI}."
 
+		git_branch
 		git_sumbodules
 		cursha1=$(git rev-parse origin/${EGIT_BRANCH})
 
@@ -303,22 +321,8 @@
 
 	# unpack to the ${S}
 	popd &> /dev/null
-	debug-print "git clone -l \"${GIT_DIR}\" \"${S}\""
-	git clone -l "${GIT_DIR}" "${S}"
-
-	# set correct branch and the tree ebuild specified
-	pushd "${S}" > /dev/null
-	local branchname=branch-${EGIT_BRANCH} src=origin/${EGIT_BRANCH}
-	if [[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]]; then
-		branchname=tree-${EGIT_COMMIT}
-		src=${EGIT_COMMIT}
-	fi
-	debug-print "git checkout -b ${branchname} ${src}"
-	git checkout -b ${branchname} ${src} 2>&1 > /dev/null
-	git_sumbodules
-	popd > /dev/null
-
-	unset branchname src
+	debug-print "git clone -l -s \"${GIT_DIR}\" \"${S}\""
+	git clone -l -s "${GIT_DIR}" "${S}"
 
 	echo ">>> Unpacked to ${S}"
 }






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2010-01-22  9:32 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2010-01-22  9:32 UTC (permalink / raw
  To: gentoo-commits

scarabeus    10/01/22 09:32:57

  Modified:             git.eclass
  Log:
  Update git eclass to work hopefully with git-submodules yet again. Drop usage of eqawarn.

Revision  Changes    Path
1.37                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.37&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.37&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.36&r2=1.37

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- git.eclass	13 Jan 2010 22:14:59 -0000	1.36
+++ git.eclass	22 Jan 2010 09:32:57 -0000	1.37
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.36 2010/01/13 22:14:59 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.37 2010/01/22 09:32:57 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -145,7 +145,7 @@
 # @FUNCTION: git_submodules
 # @DESCRIPTION:
 # Internal function wrapping the submodule initialisation and update
-git_sumbodules() {
+git_submodules() {
 	debug-print "git submodule init"
 	git submodule init
 	debug-print "git submodule update"
@@ -191,8 +191,8 @@
 	#	EGIT_FETCH_CMD="${EGIT_FETCH_CMD} --depth 1"
 	if [[ ! -z ${EGIT_TREE} ]] ; then
 		EGIT_COMMIT=${EGIT_TREE}
-		eqawarn "Usage of deprecated EGIT_TREE variable detected."
-		eqawarn "Use EGIT_COMMIT variable instead."
+		ewarn "QA: Usage of deprecated EGIT_TREE variable detected."
+		ewarn "QA: Use EGIT_COMMIT variable instead."
 	fi
 
 	# EGIT_REPO_URI is empty.
@@ -228,7 +228,6 @@
 	debug-print "${FUNCNAME}: EGIT_OPTIONS = \"${EGIT_OPTIONS}\""
 
 	GIT_DIR="${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
-	pushd ${EGIT_STORE_DIR} &> /dev/null
 	# we also have to remove all shallow copied repositories
 	# and fetch them again
 	if [[ -e "${GIT_DIR}/shallow" ]]; then
@@ -254,8 +253,7 @@
 		cursha1=$(git rev-parse origin/${EGIT_BRANCH})
 		${elogcmd} "   at the commit:		${cursha1}"
 
-		git_branch
-		git_sumbodules
+		git_submodules
 		popd &> /dev/null
 	elif [[ -n ${EGIT_OFFLINE} ]] ; then
 		pushd "${GIT_DIR}" &> /dev/null
@@ -276,11 +274,15 @@
 		oldsha1=$(git rev-parse origin/${EGIT_BRANCH})
 
 		debug-print "${EGIT_UPDATE_CMD} ${EGIT_OPTIONS}"
+		# fix branching
+		git checkout master
+		for x in $(git branch |grep -v "* master" |tr '\n' ' '); do
+			git branch -D ${x}
+		done
 		${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} \
 			|| die "${EGIT}: can't update from ${EGIT_REPO_URI}."
 
-		git_branch
-		git_sumbodules
+		git_submodules
 		cursha1=$(git rev-parse origin/${EGIT_BRANCH})
 
 		# write out message based on the revisions
@@ -315,14 +317,21 @@
 	# export the git version
 	export EGIT_VERSION="${cursha1}"
 
+	# log the repo state
 	[[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]] && elog "   commit:			${EGIT_COMMIT}"
 	${elogcmd} "   branch: 			${EGIT_BRANCH}"
 	${elogcmd} "   storage directory: 	\"${GIT_DIR}\""
 
-	# unpack to the ${S}
+	pushd "${GIT_DIR}" &> /dev/null
+	debug-print "rsync -rlpgo . \"${S}\""
+	time rsync -rlpgo . "${S}"
+	popd &> /dev/null
+
+	pushd "${S}" &> /dev/null
+	git_branch
+	# submodules always reqire net (thanks to branches changing)
+	[[ -n ${EGIT_OFFLINE} ]] || git_submodules
 	popd &> /dev/null
-	debug-print "git clone -l -s \"${GIT_DIR}\" \"${S}\""
-	git clone -l -s "${GIT_DIR}" "${S}"
 
 	echo ">>> Unpacked to ${S}"
 }






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2010-01-23 15:46 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2010-01-23 15:46 UTC (permalink / raw
  To: gentoo-commits

scarabeus    10/01/23 15:46:51

  Modified:             git.eclass
  Log:
  Introduce EGIT_MASTER to specify master branch. Some upstreams dont have master called master :]

Revision  Changes    Path
1.38                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.38&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.38&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.37&r2=1.38

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- git.eclass	22 Jan 2010 09:32:57 -0000	1.37
+++ git.eclass	23 Jan 2010 15:46:50 -0000	1.38
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.37 2010/01/22 09:32:57 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.38 2010/01/23 15:46:50 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -64,6 +64,12 @@
 # This variable value is passed to clone and fetch.
 : ${EGIT_OPTIONS:=}
 
+# @ECLASS-VARIABLE: EGIT_MASTER
+# @DESCRIPTION:
+# Variable for specifying master branch.
+# Usefull when upstream don't have master branch.
+: ${EGIT_MASTER:=master}
+
 # @ECLASS-VARIABLE: EGIT_REPO_URI
 # @DESCRIPTION:
 # URI for the repository
@@ -275,7 +281,7 @@
 
 		debug-print "${EGIT_UPDATE_CMD} ${EGIT_OPTIONS}"
 		# fix branching
-		git checkout master
+		git checkout ${EGIT_MASTER}
 		for x in $(git branch |grep -v "* master" |tr '\n' ' '); do
 			git branch -D ${x}
 		done






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2010-01-25 17:15 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2010-01-25 17:15 UTC (permalink / raw
  To: gentoo-commits

scarabeus    10/01/25 17:15:19

  Modified:             git.eclass
  Log:
  Fix non-master master breakage with deleting own branch.

Revision  Changes    Path
1.39                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.39&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.39&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.38&r2=1.39

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- git.eclass	23 Jan 2010 15:46:50 -0000	1.38
+++ git.eclass	25 Jan 2010 17:15:18 -0000	1.39
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.38 2010/01/23 15:46:50 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.39 2010/01/25 17:15:18 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -282,7 +282,7 @@
 		debug-print "${EGIT_UPDATE_CMD} ${EGIT_OPTIONS}"
 		# fix branching
 		git checkout ${EGIT_MASTER}
-		for x in $(git branch |grep -v "* master" |tr '\n' ' '); do
+		for x in $(git branch |grep -v "* ${EGIT_MASTER}" |tr '\n' ' '); do
 			git branch -D ${x}
 		done
 		${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} \






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2010-01-31 10:05 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2010-01-31 10:05 UTC (permalink / raw
  To: gentoo-commits

scarabeus    10/01/31 10:05:57

  Modified:             git.eclass
  Log:
  Support eapi3.

Revision  Changes    Path
1.40                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.40&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.40&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.39&r2=1.40

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- git.eclass	25 Jan 2010 17:15:18 -0000	1.39
+++ git.eclass	31 Jan 2010 10:05:57 -0000	1.40
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.39 2010/01/25 17:15:18 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.40 2010/01/31 10:05:57 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -20,8 +20,8 @@
 
 EXPORTED_FUNCTIONS="src_unpack"
 case "${EAPI:-0}" in
-	2) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;;
-	0|1) ;;
+	3|2) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;;
+	1|0) ;;
 	*) die "Unknown EAPI, Bug eclass maintainers." ;;
 esac
 EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2010-01-31 10:13 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2010-01-31 10:13 UTC (permalink / raw
  To: gentoo-commits

scarabeus    10/01/31 10:13:58

  Modified:             git.eclass
  Log:
  Do the handling of not known eapi by depend and not by die.

Revision  Changes    Path
1.41                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.41&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.41&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.40&r2=1.41

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- git.eclass	31 Jan 2010 10:05:57 -0000	1.40
+++ git.eclass	31 Jan 2010 10:13:57 -0000	1.41
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.40 2010/01/31 10:05:57 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.41 2010/01/31 10:13:57 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -22,7 +22,7 @@
 case "${EAPI:-0}" in
 	3|2) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;;
 	1|0) ;;
-	*) die "Unknown EAPI, Bug eclass maintainers." ;;
+	:) DEPEND="EAPI-UNSUPPORTED" ;;
 esac
 EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
 






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2010-02-23  0:43 Jonathan Callen (abcd)
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Callen (abcd) @ 2010-02-23  0:43 UTC (permalink / raw
  To: gentoo-commits

abcd        10/02/23 00:43:55

  Modified:             git.eclass
  Log:
  Speed up code for the common case where there are no submodules - if there are submodules, then you will need to set EGIT_HAS_SUBMODULES=true before inherit

Revision  Changes    Path
1.42                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.42&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.42&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.41&r2=1.42

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- git.eclass	31 Jan 2010 10:13:57 -0000	1.41
+++ git.eclass	23 Feb 2010 00:43:54 -0000	1.42
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.41 2010/01/31 10:13:57 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.42 2010/02/23 00:43:54 abcd Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -18,6 +18,9 @@
 
 EGIT="git.eclass"
 
+# We DEPEND on at least a bit recent git version
+DEPEND=">=dev-util/git-1.6"
+
 EXPORTED_FUNCTIONS="src_unpack"
 case "${EAPI:-0}" in
 	3|2) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;;
@@ -29,9 +32,6 @@
 # define some nice defaults but only if nothing is set already
 : ${HOMEPAGE:=http://git-scm.com/}
 
-# We DEPEND on at least a bit recent git version
-DEPEND=">=dev-util/git-1.6"
-
 # @ECLASS-VARIABLE: EGIT_QUIET
 # @DESCRIPTION:
 # Enables user specified verbosity for the eclass elog informations.
@@ -44,6 +44,12 @@
 # Can be redefined.
 [[ -z ${EGIT_STORE_DIR} ]] && EGIT_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/git-src"
 
+# @ECLASS-VARIABLE: EGIT_HAS_SUBMODULES
+# @DESCRIPTION:
+# Set this to "true" to enable the (slower) submodule support.
+# This variable should be set before inheriting git.eclass
+: ${EGIT_HAS_SUBMODULES:=false}
+
 # @ECLASS-VARIABLE: EGIT_FETCH_CMD
 # @DESCRIPTION:
 # Command for cloning the repository.
@@ -52,7 +58,11 @@
 # @ECLASS-VARIABLE: EGIT_UPDATE_CMD
 # @DESCRIPTION:
 # Git fetch command.
-EGIT_UPDATE_CMD="git pull -f -u"
+if ${EGIT_HAS_SUBMODULES}; then
+	EGIT_UPDATE_CMD="git pull -f -u"
+else
+	EGIT_UPDATE_CMD="git fetch -f -u"
+fi
 
 # @ECLASS-VARIABLE: EGIT_DIFFSTAT_CMD
 # @DESCRIPTION:
@@ -152,10 +162,12 @@
 # @DESCRIPTION:
 # Internal function wrapping the submodule initialisation and update
 git_submodules() {
-	debug-print "git submodule init"
-	git submodule init
-	debug-print "git submodule update"
-	git submodule update
+	if ${EGIT_HAS_SUBMODULES}; then
+		debug-print "git submodule init"
+		git submodule init
+		debug-print "git submodule update"
+		git submodule update
+	fi
 }
 
 # @FUNCTION: git_branch
@@ -180,7 +192,8 @@
 git_fetch() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	local GIT_DIR EGIT_CLONE_DIR oldsha1 cursha1
+	local GIT_DIR EGIT_CLONE_DIR oldsha1 cursha1 extra_clone_opts upstream_branch
+	${EGIT_USE_SUBMODULES} || export GIT_DIR
 
 	# choose if user wants elog or just einfo.
 	if [[ ${EGIT_QUIET} != OFF ]]; then
@@ -241,29 +254,40 @@
 		einfo "The ${EGIT_CLONE_DIR} was shallow copy. Refetching."
 	fi
 	# repack from bare copy to normal one
-	if [[ -d ${GIT_DIR} && ! -d "${GIT_DIR}/.git/" ]]; then
+	if ${EGIT_HAS_SUBMODULES} && [[ -d ${GIT_DIR} && ! -d "${GIT_DIR}/.git/" ]]; then
 		rm -rf "${GIT_DIR}"
 		einfo "The ${EGIT_CLONE_DIR} was bare copy. Refetching."
 	fi
+	if ! ${EGIT_HAS_SUBMODULES} && [[ -d ${GIT_DIR} && -d ${GIT_DIR}/.git ]]; then
+		rm -rf "${GIT_DIR}"
+		einfo "The ${EGIT_CLONE_DIR} was not a bare copy. Refetching."
+	fi
+
+	if ${EGIT_HAS_SUBMODULES}; then
+		upstream_branch=origin/${EGIT_BRANCH}
+	else
+		upstream_branch=${EGIT_BRANCH}
+		extra_clone_opts=--bare
+	fi
 
 	if [[ ! -d ${GIT_DIR} ]] ; then
 		# first clone
 		${elogcmd} "GIT NEW clone -->"
 		${elogcmd} "   repository: 		${EGIT_REPO_URI}"
 
-		debug-print "${EGIT_FETCH_CMD} ${EGIT_OPTIONS} \"${EGIT_REPO_URI}\" ${GIT_DIR}"
-		${EGIT_FETCH_CMD} ${EGIT_OPTIONS} "${EGIT_REPO_URI}" ${GIT_DIR} \
+		debug-print "${EGIT_FETCH_CMD} ${extra_clone_opts} ${EGIT_OPTIONS} \"${EGIT_REPO_URI}\" ${GIT_DIR}"
+		${EGIT_FETCH_CMD} ${extra_clone_opts} ${EGIT_OPTIONS} "${EGIT_REPO_URI}" ${GIT_DIR} \
 			|| die "${EGIT}: can't fetch from ${EGIT_REPO_URI}."
-		
+
 		pushd "${GIT_DIR}" &> /dev/null
-		cursha1=$(git rev-parse origin/${EGIT_BRANCH})
+		cursha1=$(git rev-parse ${upstream_branch})
 		${elogcmd} "   at the commit:		${cursha1}"
 
 		git_submodules
 		popd &> /dev/null
 	elif [[ -n ${EGIT_OFFLINE} ]] ; then
 		pushd "${GIT_DIR}" &> /dev/null
-		cursha1=$(git rev-parse origin/${EGIT_BRANCH})
+		cursha1=$(git rev-parse ${upstream_branch})
 		${elogcmd} "GIT offline update -->"
 		${elogcmd} "   repository: 		${EGIT_REPO_URI}"
 		${elogcmd} "   at the commit:		${cursha1}"
@@ -276,20 +300,26 @@
 		# fetch updates
 		${elogcmd} "GIT update -->"
 		${elogcmd} "   repository: 		${EGIT_REPO_URI}"
-		
-		oldsha1=$(git rev-parse origin/${EGIT_BRANCH})
 
-		debug-print "${EGIT_UPDATE_CMD} ${EGIT_OPTIONS}"
-		# fix branching
-		git checkout ${EGIT_MASTER}
-		for x in $(git branch |grep -v "* ${EGIT_MASTER}" |tr '\n' ' '); do
-			git branch -D ${x}
-		done
-		${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} \
-			|| die "${EGIT}: can't update from ${EGIT_REPO_URI}."
+		oldsha1=$(git rev-parse ${upstream_branch})
+
+		if ${EGIT_HAS_SUBMODULES}; then
+			debug-print "${EGIT_UPDATE_CMD} ${EGIT_OPTIONS}"
+			# fix branching
+			git checkout ${EGIT_MASTER}
+			for x in $(git branch |grep -v "* ${EGIT_MASTER}" |tr '\n' ' '); do
+				git branch -D ${x}
+			done
+			${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} \
+				|| die "${EGIT}: can't update from ${EGIT_REPO_URI}."
+		else
+			debug-print "${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} origin ${EGIT_BRANCH}:${EGIT_BRANCH}"
+			${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} origin ${EGIT_BRANCH}:${EGIT_BRANCH} \
+				|| die "${EGIT}: can't update from ${EGIT_REPO_URI}."
+		fi
 
 		git_submodules
-		cursha1=$(git rev-parse origin/${EGIT_BRANCH})
+		cursha1=$(git rev-parse ${upstream_branch})
 
 		# write out message based on the revisions
 		if [[ ${oldsha1} != ${cursha1} ]]; then
@@ -308,10 +338,10 @@
 				debug-print "${FUNCNAME}: Repository \"${EGIT_REPO_URI}\" is up-to-date. Skipping." && \
 				die "${EGIT}: Repository \"${EGIT_REPO_URI}\" is up-to-date. Skipping."
 		fi
-		${EGIT_DIFFSTAT_CMD} ${oldsha1}..origin/${EGIT_BRANCH}
+		${EGIT_DIFFSTAT_CMD} ${oldsha1}..${upstream_branch}
 		popd &> /dev/null
 	fi
-	
+
 	pushd "${GIT_DIR}" &> /dev/null
 	if ${EGIT_REPACK} || ${EGIT_PRUNE} ; then
 		ebegin "Garbage collecting the repository"
@@ -328,10 +358,16 @@
 	${elogcmd} "   branch: 			${EGIT_BRANCH}"
 	${elogcmd} "   storage directory: 	\"${GIT_DIR}\""
 
-	pushd "${GIT_DIR}" &> /dev/null
-	debug-print "rsync -rlpgo . \"${S}\""
-	time rsync -rlpgo . "${S}"
-	popd &> /dev/null
+	if ${EGIT_HAS_SUBMODULES}; then
+		pushd "${GIT_DIR}" &> /dev/null
+		debug-print "rsync -rlpgo . \"${S}\""
+		time rsync -rlpgo . "${S}"
+		popd &> /dev/null
+	else
+		unset GIT_DIR
+		debug-print "git clone -l -s -n \"${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}\" \"${S}\""
+		git clone -l -s -n "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" "${S}"
+	fi
 
 	pushd "${S}" &> /dev/null
 	git_branch






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2010-02-24  1:16 Jonathan Callen (abcd)
  0 siblings, 0 replies; 48+ messages in thread
From: Jonathan Callen (abcd) @ 2010-02-24  1:16 UTC (permalink / raw
  To: gentoo-commits

abcd        10/02/24 01:16:35

  Modified:             git.eclass
  Log:
  Fix typo

Revision  Changes    Path
1.43                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.43&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.43&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.42&r2=1.43

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- git.eclass	23 Feb 2010 00:43:54 -0000	1.42
+++ git.eclass	24 Feb 2010 01:16:35 -0000	1.43
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.42 2010/02/23 00:43:54 abcd Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.43 2010/02/24 01:16:35 abcd Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -193,7 +193,7 @@
 	debug-print-function ${FUNCNAME} "$@"
 
 	local GIT_DIR EGIT_CLONE_DIR oldsha1 cursha1 extra_clone_opts upstream_branch
-	${EGIT_USE_SUBMODULES} || export GIT_DIR
+	${EGIT_HAS_SUBMODULES} || export GIT_DIR
 
 	# choose if user wants elog or just einfo.
 	if [[ ${EGIT_QUIET} != OFF ]]; then






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2010-03-17 15:17 Sebastian Pipping (sping)
  0 siblings, 0 replies; 48+ messages in thread
From: Sebastian Pipping (sping) @ 2010-03-17 15:17 UTC (permalink / raw
  To: gentoo-commits

sping       10/03/17 15:17:11

  Modified:             git.eclass
  Log:
  Move from dev-util/git to dev-vcs/git

Revision  Changes    Path
1.44                 eclass/git.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.44&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?rev=1.44&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/git.eclass?r1=1.43&r2=1.44

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- git.eclass	24 Feb 2010 01:16:35 -0000	1.43
+++ git.eclass	17 Mar 2010 15:17:10 -0000	1.44
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.43 2010/02/24 01:16:35 abcd Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.44 2010/03/17 15:17:10 sping Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -19,7 +19,7 @@
 EGIT="git.eclass"
 
 # We DEPEND on at least a bit recent git version
-DEPEND=">=dev-util/git-1.6"
+DEPEND=">=dev-vcs/git-1.6"
 
 EXPORTED_FUNCTIONS="src_unpack"
 case "${EAPI:-0}" in






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2010-07-26  2:22 Maciej Mrozowski (reavertm)
  0 siblings, 0 replies; 48+ messages in thread
From: Maciej Mrozowski (reavertm) @ 2010-07-26  2:22 UTC (permalink / raw
  To: gentoo-commits

reavertm    10/07/26 02:22:18

  Modified:             git.eclass
  Log:
  Fix security issues. Unify boolean logic for boolean variables to nonzero/empty.

Revision  Changes    Path
1.45                 eclass/git.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.45&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.45&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?r1=1.44&r2=1.45

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- git.eclass	17 Mar 2010 15:17:10 -0000	1.44
+++ git.eclass	26 Jul 2010 02:22:18 -0000	1.45
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.44 2010/03/17 15:17:10 sping Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.45 2010/07/26 02:22:18 reavertm Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -34,9 +34,8 @@
 
 # @ECLASS-VARIABLE: EGIT_QUIET
 # @DESCRIPTION:
-# Enables user specified verbosity for the eclass elog informations.
-# The user just needs to add EGIT_QUIET="ON" to the /etc/make.conf.
-: ${EGIT_QUIET:="OFF"}
+# Set to nonempty value to supress some eclass messages.
+: ${EGIT_QUIET:=${ESCM_QUIET}}
 
 # @ECLASS-VARIABLE: EGIT_STORE_DIR
 # @DESCRIPTION:
@@ -46,9 +45,8 @@
 
 # @ECLASS-VARIABLE: EGIT_HAS_SUBMODULES
 # @DESCRIPTION:
-# Set this to "true" to enable the (slower) submodule support.
-# This variable should be set before inheriting git.eclass
-: ${EGIT_HAS_SUBMODULES:=false}
+# Set this to nonzero value to enable submodule support (slower).
+: ${EGIT_HAS_SUBMODULES:=}
 
 # @ECLASS-VARIABLE: EGIT_FETCH_CMD
 # @DESCRIPTION:
@@ -58,7 +56,7 @@
 # @ECLASS-VARIABLE: EGIT_UPDATE_CMD
 # @DESCRIPTION:
 # Git fetch command.
-if ${EGIT_HAS_SUBMODULES}; then
+if [[ -n ${EGIT_HAS_SUBMODULES} ]]; then
 	EGIT_UPDATE_CMD="git pull -f -u"
 else
 	EGIT_UPDATE_CMD="git fetch -f -u"
@@ -118,7 +116,7 @@
 # Set this variable to a non-empty value to disable the automatic updating of
 # an GIT source tree. This is intended to be set outside the git source
 # tree by users.
-EGIT_OFFLINE="${EGIT_OFFLINE:-${ESCM_OFFLINE}}"
+: ${EGIT_OFFLINE:=${ESCM_OFFLINE}}
 
 # @ECLASS-VARIABLE: EGIT_PATCHES
 # @DESCRIPTION:
@@ -150,19 +148,19 @@
 # @DESCRIPTION:
 # git eclass will repack objects to save disk space. However this can take a
 # long time with VERY big repositories.
-: ${EGIT_REPACK:=false}
+: ${EGIT_REPACK:=}
 
 # @ECLASS-VARIABLE: EGIT_PRUNE
 # @DESCRIPTION:
 # git eclass can prune the local clone. This is useful if upstream rewinds and
 # rebases branches too often.
-: ${EGIT_PRUNE:=false}
+: ${EGIT_PRUNE:=}
 
 # @FUNCTION: git_submodules
 # @DESCRIPTION:
 # Internal function wrapping the submodule initialisation and update
 git_submodules() {
-	if ${EGIT_HAS_SUBMODULES}; then
+	if [[ -n ${EGIT_HAS_SUBMODULES} ]]; then
 		debug-print "git submodule init"
 		git submodule init
 		debug-print "git submodule update"
@@ -193,10 +191,10 @@
 	debug-print-function ${FUNCNAME} "$@"
 
 	local GIT_DIR EGIT_CLONE_DIR oldsha1 cursha1 extra_clone_opts upstream_branch
-	${EGIT_HAS_SUBMODULES} || export GIT_DIR
+	[[ -z ${EGIT_HAS_SUBMODULES} ]] && export GIT_DIR
 
 	# choose if user wants elog or just einfo.
-	if [[ ${EGIT_QUIET} != OFF ]]; then
+	if [[ -n ${EGIT_QUIET} ]]; then
 		elogcmd="einfo"
 	else
 		elogcmd="elog"
@@ -254,16 +252,16 @@
 		einfo "The ${EGIT_CLONE_DIR} was shallow copy. Refetching."
 	fi
 	# repack from bare copy to normal one
-	if ${EGIT_HAS_SUBMODULES} && [[ -d ${GIT_DIR} && ! -d "${GIT_DIR}/.git/" ]]; then
+	if [[ -n ${EGIT_HAS_SUBMODULES} ]] && [[ -d ${GIT_DIR} && ! -d "${GIT_DIR}/.git/" ]]; then
 		rm -rf "${GIT_DIR}"
 		einfo "The ${EGIT_CLONE_DIR} was bare copy. Refetching."
 	fi
-	if ! ${EGIT_HAS_SUBMODULES} && [[ -d ${GIT_DIR} && -d ${GIT_DIR}/.git ]]; then
+	if [[ -z ${EGIT_HAS_SUBMODULES} ]] && [[ -d ${GIT_DIR} && -d ${GIT_DIR}/.git ]]; then
 		rm -rf "${GIT_DIR}"
 		einfo "The ${EGIT_CLONE_DIR} was not a bare copy. Refetching."
 	fi
 
-	if ${EGIT_HAS_SUBMODULES}; then
+	if [[ -n ${EGIT_HAS_SUBMODULES} ]]; then
 		upstream_branch=origin/${EGIT_BRANCH}
 	else
 		upstream_branch=${EGIT_BRANCH}
@@ -303,7 +301,7 @@
 
 		oldsha1=$(git rev-parse ${upstream_branch})
 
-		if ${EGIT_HAS_SUBMODULES}; then
+		if [[ -n ${EGIT_HAS_SUBMODULES} ]]; then
 			debug-print "${EGIT_UPDATE_CMD} ${EGIT_OPTIONS}"
 			# fix branching
 			git checkout ${EGIT_MASTER}
@@ -343,7 +341,7 @@
 	fi
 
 	pushd "${GIT_DIR}" &> /dev/null
-	if ${EGIT_REPACK} || ${EGIT_PRUNE} ; then
+	if [[ -n ${EGIT_REPACK} ]] || [[ -n ${EGIT_PRUNE} ]]; then
 		ebegin "Garbage collecting the repository"
 		git gc $(${EGIT_PRUNE} && echo '--prune')
 		eend $?
@@ -358,7 +356,7 @@
 	${elogcmd} "   branch: 			${EGIT_BRANCH}"
 	${elogcmd} "   storage directory: 	\"${GIT_DIR}\""
 
-	if ${EGIT_HAS_SUBMODULES}; then
+	if [[ -n ${EGIT_HAS_SUBMODULES} ]]; then
 		pushd "${GIT_DIR}" &> /dev/null
 		debug-print "rsync -rlpgo . \"${S}\""
 		time rsync -rlpgo . "${S}"






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2010-07-26  2:51 Maciej Mrozowski (reavertm)
  0 siblings, 0 replies; 48+ messages in thread
From: Maciej Mrozowski (reavertm) @ 2010-07-26  2:51 UTC (permalink / raw
  To: gentoo-commits

reavertm    10/07/26 02:51:33

  Modified:             git.eclass
  Log:
  Fix EGIT_PRUNE handling, update eclassdocs

Revision  Changes    Path
1.46                 eclass/git.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.46&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.46&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?r1=1.45&r2=1.46

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- git.eclass	26 Jul 2010 02:22:18 -0000	1.45
+++ git.eclass	26 Jul 2010 02:51:33 -0000	1.46
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.45 2010/07/26 02:22:18 reavertm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.46 2010/07/26 02:51:33 reavertm Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -34,7 +34,7 @@
 
 # @ECLASS-VARIABLE: EGIT_QUIET
 # @DESCRIPTION:
-# Set to nonempty value to supress some eclass messages.
+# Set to non-empty value to supress some eclass messages.
 : ${EGIT_QUIET:=${ESCM_QUIET}}
 
 # @ECLASS-VARIABLE: EGIT_STORE_DIR
@@ -45,7 +45,7 @@
 
 # @ECLASS-VARIABLE: EGIT_HAS_SUBMODULES
 # @DESCRIPTION:
-# Set this to nonzero value to enable submodule support (slower).
+# Set this to non-empty value to enable submodule support (slower).
 : ${EGIT_HAS_SUBMODULES:=}
 
 # @ECLASS-VARIABLE: EGIT_FETCH_CMD
@@ -146,14 +146,14 @@
 
 # @ECLASS-VARIABLE: EGIT_REPACK
 # @DESCRIPTION:
-# git eclass will repack objects to save disk space. However this can take a
-# long time with VERY big repositories.
+# Set to non-empty value to repack objects to save disk space. However this can
+# take a long time with VERY big repositories.
 : ${EGIT_REPACK:=}
 
 # @ECLASS-VARIABLE: EGIT_PRUNE
 # @DESCRIPTION:
-# git eclass can prune the local clone. This is useful if upstream rewinds and
-# rebases branches too often.
+# Set to non-empty value to prune loose objects on each fetch. This is useful
+# if upstream rewinds and rebases branches often.
 : ${EGIT_PRUNE:=}
 
 # @FUNCTION: git_submodules
@@ -343,7 +343,9 @@
 	pushd "${GIT_DIR}" &> /dev/null
 	if [[ -n ${EGIT_REPACK} ]] || [[ -n ${EGIT_PRUNE} ]]; then
 		ebegin "Garbage collecting the repository"
-		git gc $(${EGIT_PRUNE} && echo '--prune')
+		local args
+		[[ -n ${EGIT_PRUNE} ]] && args='--prune'
+		git gc ${args}
 		eend $?
 	fi
 	popd &> /dev/null






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2010-07-26  3:24 Maciej Mrozowski (reavertm)
  0 siblings, 0 replies; 48+ messages in thread
From: Maciej Mrozowski (reavertm) @ 2010-07-26  3:24 UTC (permalink / raw
  To: gentoo-commits

reavertm    10/07/26 03:24:20

  Modified:             git.eclass
  Log:
  Simplify some logical constructs, quote binary operator arguments

Revision  Changes    Path
1.47                 eclass/git.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.47&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.47&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?r1=1.46&r2=1.47

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- git.eclass	26 Jul 2010 02:51:33 -0000	1.46
+++ git.eclass	26 Jul 2010 03:24:19 -0000	1.47
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.46 2010/07/26 02:51:33 reavertm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.47 2010/07/26 03:24:19 reavertm Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -41,7 +41,7 @@
 # @DESCRIPTION:
 # Storage directory for git sources.
 # Can be redefined.
-[[ -z ${EGIT_STORE_DIR} ]] && EGIT_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/git-src"
+: ${EGIT_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/git-src"}
 
 # @ECLASS-VARIABLE: EGIT_HAS_SUBMODULES
 # @DESCRIPTION:
@@ -91,7 +91,7 @@
 #   ssh://
 eval X="\$${PN//[-+]/_}_LIVE_REPO"
 if [[ ${X} = "" ]]; then
-	EGIT_REPO_URI=${EGIT_REPO_URI:=}
+	: ${EGIT_REPO_URI:=}
 else
 	EGIT_REPO_URI="${X}"
 fi
@@ -128,8 +128,8 @@
 # @DESCRIPTION:
 # git eclass can fetch any branch in git_fetch().
 eval X="\$${PN//[-+]/_}_LIVE_BRANCH"
-if [[ ${X} = "" ]]; then
-	EGIT_BRANCH=${EGIT_BRANCH:=master}
+if [[ "${X}" = "" ]]; then
+	: ${EGIT_BRANCH:=master}
 else
 	EGIT_BRANCH="${X}"
 fi
@@ -138,7 +138,7 @@
 # @DESCRIPTION:
 # git eclass can checkout any commit.
 eval X="\$${PN//[-+]/_}_LIVE_COMMIT"
-if [[ ${X} = "" ]]; then
+if [[ "${X}" = "" ]]; then
 	: ${EGIT_COMMIT:=${EGIT_BRANCH}}
 else
 	EGIT_COMMIT="${X}"
@@ -174,7 +174,7 @@
 # EGIT_BRANCH variables.
 git_branch() {
 	local branchname=branch-${EGIT_BRANCH} src=origin/${EGIT_BRANCH}
-	if [[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]]; then
+	if [[ "${EGIT_COMMIT}" != "${EGIT_BRANCH}" ]]; then
 		branchname=tree-${EGIT_COMMIT}
 		src=${EGIT_COMMIT}
 	fi
@@ -206,7 +206,7 @@
 	# folder.
 	#[[ ${EGIT_COMMIT} = ${EGIT_BRANCH} ]] && \
 	#	EGIT_FETCH_CMD="${EGIT_FETCH_CMD} --depth 1"
-	if [[ ! -z ${EGIT_TREE} ]] ; then
+	if [[ -n ${EGIT_TREE} ]] ; then
 		EGIT_COMMIT=${EGIT_TREE}
 		ewarn "QA: Usage of deprecated EGIT_TREE variable detected."
 		ewarn "QA: Use EGIT_COMMIT variable instead."
@@ -252,7 +252,7 @@
 		einfo "The ${EGIT_CLONE_DIR} was shallow copy. Refetching."
 	fi
 	# repack from bare copy to normal one
-	if [[ -n ${EGIT_HAS_SUBMODULES} ]] && [[ -d ${GIT_DIR} && ! -d "${GIT_DIR}/.git/" ]]; then
+	if [[ -n ${EGIT_HAS_SUBMODULES} ]] && [[ -d ${GIT_DIR} && ! -d ${GIT_DIR}/.git ]]; then
 		rm -rf "${GIT_DIR}"
 		einfo "The ${EGIT_CLONE_DIR} was bare copy. Refetching."
 	fi
@@ -320,7 +320,7 @@
 		cursha1=$(git rev-parse ${upstream_branch})
 
 		# write out message based on the revisions
-		if [[ ${oldsha1} != ${cursha1} ]]; then
+		if [[ "${oldsha1}" != "${cursha1}" ]]; then
 			${elogcmd} "   updating from commit:	${oldsha1}"
 			${elogcmd} "   to commit:		${cursha1}"
 		else
@@ -354,7 +354,7 @@
 	export EGIT_VERSION="${cursha1}"
 
 	# log the repo state
-	[[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]] && elog "   commit:			${EGIT_COMMIT}"
+	[[ "${EGIT_COMMIT}" != "${EGIT_BRANCH}" ]] && ${elogcmd} "   commit:			${EGIT_COMMIT}"
 	${elogcmd} "   branch: 			${EGIT_BRANCH}"
 	${elogcmd} "   storage directory: 	\"${GIT_DIR}\""
 
@@ -372,7 +372,7 @@
 	pushd "${S}" &> /dev/null
 	git_branch
 	# submodules always reqire net (thanks to branches changing)
-	[[ -n ${EGIT_OFFLINE} ]] || git_submodules
+	[[ -z ${EGIT_OFFLINE} ]] && git_submodules
 	popd &> /dev/null
 
 	echo ">>> Unpacked to ${S}"
@@ -418,7 +418,7 @@
 # @FUNCTION: git_apply_patches
 # @DESCRIPTION:
 # Apply patches from EGIT_PATCHES bash array.
-# Preffered is using the variable as bash array but for now it allows to write
+# Preferred is using the variable as bash array but for now it allows to write
 # it also as normal space separated string list. (This part of code should be
 # removed when all ebuilds get converted on bash array).
 git_apply_patches() {
@@ -430,7 +430,7 @@
 			debug-print "$FUNCNAME: git_autopatch: patching from ${i}"
 			epatch "${i}"
 		done
-	elif [[ ${EGIT_PATCHES} != "" ]]; then
+	elif [[ -n ${EGIT_PATCHES} ]]; then
 		# no need for loop if space separated string is passed.
 		debug-print "$FUNCNAME: git_autopatch: patching from ${EGIT_PATCHES}"
 		epatch "${EGIT_PATCHES}"






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2010-07-27 12:39 Maciej Mrozowski (reavertm)
  0 siblings, 0 replies; 48+ messages in thread
From: Maciej Mrozowski (reavertm) @ 2010-07-27 12:39 UTC (permalink / raw
  To: gentoo-commits

reavertm    10/07/27 12:39:34

  Modified:             git.eclass
  Log:
  Do not strip -git suffix from ${PN} when setting default EGIT_PROJECT. PN with -git suffix is perfectly acceptable package name.

Revision  Changes    Path
1.48                 eclass/git.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.48&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.48&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?r1=1.47&r2=1.48

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- git.eclass	26 Jul 2010 03:24:19 -0000	1.47
+++ git.eclass	27 Jul 2010 12:39:34 -0000	1.48
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.47 2010/07/26 03:24:19 reavertm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.48 2010/07/27 12:39:34 reavertm Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -97,14 +97,10 @@
 fi
 # @ECLASS-VARIABLE: EGIT_PROJECT
 # @DESCRIPTION:
-# Project name of your ebuild.
-# Git eclass will check out the git repository like:
-#	${EGIT_STORE_DIR}/${EGIT_PROJECT}/${EGIT_REPO_URI##*/}
-# so if you define EGIT_REPO_URI as http://git.collab.net/repo/git or
-# http://git.collab.net/repo/git. and PN is subversion-git.
-# it will check out like:
-#	${EGIT_STORE_DIR}/subversion
-: ${EGIT_PROJECT:=${PN/-git}}
+# Project name, it must be unique across EGIT_STORE_DIR.
+# Git eclass will check out the git repository into ${EGIT_STORE_DIR}/${EGIT_PROJECT}/${EGIT_REPO_URI##*/}
+# Default is ${PN}.
+: ${EGIT_PROJECT:=${PN}}
 
 # @ECLASS-VARIABLE: EGIT_BOOTSTRAP
 # @DESCRIPTION:






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2010-12-29 14:05 Michal Gorny (mgorny)
  0 siblings, 0 replies; 48+ messages in thread
From: Michal Gorny (mgorny) @ 2010-12-29 14:05 UTC (permalink / raw
  To: gentoo-commits

mgorny      10/12/29 14:05:08

  Modified:             git.eclass
  Log:
  Call 'git submodule sync' as well to support the case when submodule URL changes.

Revision  Changes    Path
1.49                 eclass/git.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.49&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.49&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?r1=1.48&r2=1.49

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- git.eclass	27 Jul 2010 12:39:34 -0000	1.48
+++ git.eclass	29 Dec 2010 14:05:08 -0000	1.49
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.48 2010/07/27 12:39:34 reavertm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.49 2010/12/29 14:05:08 mgorny Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -159,6 +159,8 @@
 	if [[ -n ${EGIT_HAS_SUBMODULES} ]]; then
 		debug-print "git submodule init"
 		git submodule init
+		debug-print "git submodule sync"
+		git submodule sync
 		debug-print "git submodule update"
 		git submodule update
 	fi






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2011-02-01 14:22 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2011-02-01 14:22 UTC (permalink / raw
  To: gentoo-commits

scarabeus    11/02/01 14:22:02

  Modified:             git.eclass
  Log:
  Add eapi4 to "known" list

Revision  Changes    Path
1.50                 eclass/git.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.50&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.50&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?r1=1.49&r2=1.50

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- git.eclass	29 Dec 2010 14:05:08 -0000	1.49
+++ git.eclass	1 Feb 2011 14:22:02 -0000	1.50
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.49 2010/12/29 14:05:08 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.50 2011/02/01 14:22:02 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -23,7 +23,7 @@
 
 EXPORTED_FUNCTIONS="src_unpack"
 case "${EAPI:-0}" in
-	3|2) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;;
+	4|3|2) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;;
 	1|0) ;;
 	:) DEPEND="EAPI-UNSUPPORTED" ;;
 esac






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2011-02-02 19:26 Ulrich Mueller (ulm)
  0 siblings, 0 replies; 48+ messages in thread
From: Ulrich Mueller (ulm) @ 2011-02-02 19:26 UTC (permalink / raw
  To: gentoo-commits

ulm         11/02/02 19:26:53

  Modified:             git.eclass
  Log:
  Remove superfluous "time" statement (with permission from scarabeus).
  Fix typo in case statement.

Revision  Changes    Path
1.51                 eclass/git.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.51&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.51&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?r1=1.50&r2=1.51

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- git.eclass	1 Feb 2011 14:22:02 -0000	1.50
+++ git.eclass	2 Feb 2011 19:26:53 -0000	1.51
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.50 2011/02/01 14:22:02 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.51 2011/02/02 19:26:53 ulm Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -25,7 +25,7 @@
 case "${EAPI:-0}" in
 	4|3|2) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;;
 	1|0) ;;
-	:) DEPEND="EAPI-UNSUPPORTED" ;;
+	*) DEPEND="EAPI-UNSUPPORTED" ;;
 esac
 EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
 
@@ -359,7 +359,7 @@
 	if [[ -n ${EGIT_HAS_SUBMODULES} ]]; then
 		pushd "${GIT_DIR}" &> /dev/null
 		debug-print "rsync -rlpgo . \"${S}\""
-		time rsync -rlpgo . "${S}"
+		rsync -rlpgo . "${S}"
 		popd &> /dev/null
 	else
 		unset GIT_DIR






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2011-03-19 15:06 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2011-03-19 15:06 UTC (permalink / raw
  To: gentoo-commits

scarabeus    11/03/19 15:06:02

  Modified:             git.eclass
  Log:
  Fixup die case for eapi instead of invalid depend.

Revision  Changes    Path
1.52                 eclass/git.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.52&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.52&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?r1=1.51&r2=1.52

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- git.eclass	2 Feb 2011 19:26:53 -0000	1.51
+++ git.eclass	19 Mar 2011 15:06:02 -0000	1.52
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.51 2011/02/02 19:26:53 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.52 2011/03/19 15:06:02 scarabeus Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
@@ -25,7 +25,7 @@
 case "${EAPI:-0}" in
 	4|3|2) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;;
 	1|0) ;;
-	*) DEPEND="EAPI-UNSUPPORTED" ;;
+	*) die "EAPI=${EAPI} is not supported" ;;
 esac
 EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
 






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2011-04-15  8:57 Marijn Schouten (hkbst)
  0 siblings, 0 replies; 48+ messages in thread
From: Marijn Schouten (hkbst) @ 2011-04-15  8:57 UTC (permalink / raw
  To: gentoo-commits

hkbst       11/04/15 08:57:04

  Modified:             git.eclass
  Log:
  add EGIT_UNPACK_DIR

Revision  Changes    Path
1.53                 eclass/git.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.53&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.53&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?r1=1.52&r2=1.53

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- git.eclass	19 Mar 2011 15:06:02 -0000	1.52
+++ git.eclass	15 Apr 2011 08:57:04 -0000	1.53
@@ -1,16 +1,16 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.52 2011/03/19 15:06:02 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.53 2011/04/15 08:57:04 hkbst Exp $
 
 # @ECLASS: git.eclass
 # @MAINTAINER:
 # Tomas Chvatal <scarabeus@gentoo.org>
 # Donnie Berkholz <dberkholz@gentoo.org>
-# @BLURB: This eclass provides functions for fetch and unpack git repositories
+# @BLURB: Fetching and unpacking of git repositories
 # @DESCRIPTION:
-# The eclass is based on subversion eclass.
-# If you use this eclass, the ${S} is ${WORKDIR}/${P}.
-# It is necessary to define the EGIT_REPO_URI variable at least.
+# The git eclass provides functions to fetch, patch and bootstrap
+# software sources from git repositories and is based on the subversion eclass.
+# It is necessary to define at least the EGIT_REPO_URI variable.
 # @THANKS TO:
 # Fernando J. Pereda <ferdy@gentoo.org>
 
@@ -18,7 +18,7 @@
 
 EGIT="git.eclass"
 
-# We DEPEND on at least a bit recent git version
+# We DEPEND on a not too ancient git version
 DEPEND=">=dev-vcs/git-1.6"
 
 EXPORTED_FUNCTIONS="src_unpack"
@@ -43,6 +43,10 @@
 # Can be redefined.
 : ${EGIT_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/git-src"}
 
+# @ECLASS-VARIABLE: EGIT_UNPACK_DIR
+# @DESCRIPTION:
+# Directory to unpack git sources in.
+
 # @ECLASS-VARIABLE: EGIT_HAS_SUBMODULES
 # @DESCRIPTION:
 # Set this to non-empty value to enable submodule support (slower).
@@ -358,22 +362,22 @@
 
 	if [[ -n ${EGIT_HAS_SUBMODULES} ]]; then
 		pushd "${GIT_DIR}" &> /dev/null
-		debug-print "rsync -rlpgo . \"${S}\""
-		rsync -rlpgo . "${S}"
+		debug-print "rsync -rlpgo . \"${EGIT_UNPACK_DIR:-${S}}\""
+		time rsync -rlpgo . "${EGIT_UNPACK_DIR:-${S}}"
 		popd &> /dev/null
 	else
 		unset GIT_DIR
-		debug-print "git clone -l -s -n \"${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}\" \"${S}\""
-		git clone -l -s -n "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" "${S}"
+		debug-print "git clone -l -s -n \"${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}\" \"${EGIT_UNPACK_DIR:-${S}}\""
+		git clone -l -s -n "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" "${EGIT_UNPACK_DIR:-${S}}"
 	fi
 
-	pushd "${S}" &> /dev/null
+	pushd "${EGIT_UNPACK_DIR:-${S}}" &> /dev/null
 	git_branch
 	# submodules always reqire net (thanks to branches changing)
 	[[ -z ${EGIT_OFFLINE} ]] && git_submodules
 	popd &> /dev/null
 
-	echo ">>> Unpacked to ${S}"
+	echo ">>> Unpacked to ${EGIT_UNPACK_DIR:-${S}}"
 }
 
 # @FUNCTION: git_bootstrap
@@ -422,7 +426,7 @@
 git_apply_patches() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	pushd "${S}" > /dev/null
+	pushd "${EGIT_UNPACK_DIR:-${S}}" > /dev/null
 	if [[ ${#EGIT_PATCHES[@]} -gt 1 ]] ; then
 		for i in "${EGIT_PATCHES[@]}"; do
 			debug-print "$FUNCNAME: git_autopatch: patching from ${i}"






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2011-04-20 10:57 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 48+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2011-04-20 10:57 UTC (permalink / raw
  To: gentoo-commits

scarabeus    11/04/20 10:57:42

  Modified:             git.eclass
  Log:
  Mark git.eclass as deprecated in favor of git-2 one.

Revision  Changes    Path
1.54                 eclass/git.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.54&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.54&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?r1=1.53&r2=1.54

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- git.eclass	15 Apr 2011 08:57:04 -0000	1.53
+++ git.eclass	20 Apr 2011 10:57:42 -0000	1.54
@@ -1,6 +1,10 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.53 2011/04/15 08:57:04 hkbst Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.54 2011/04/20 10:57:42 scarabeus Exp $
+
+# @DEPRECATED
+# This eclass has been superseded by git-2 eclass.
+# Please modify your ebuilds to use that one instead.
 
 # @ECLASS: git.eclass
 # @MAINTAINER:






^ permalink raw reply	[flat|nested] 48+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: git.eclass
@ 2011-09-12 12:49 Michal Gorny (mgorny)
  0 siblings, 0 replies; 48+ messages in thread
From: Michal Gorny (mgorny) @ 2011-09-12 12:49 UTC (permalink / raw
  To: gentoo-commits

mgorny      11/09/12 12:49:44

  Modified:             git.eclass
  Log:
  Issue deprecation warning for devs on use.

Revision  Changes    Path
1.57                 eclass/git.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.57&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?rev=1.57&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git.eclass?r1=1.56&r2=1.57

Index: git.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git.eclass,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- git.eclass	22 Aug 2011 04:46:31 -0000	1.56
+++ git.eclass	12 Sep 2011 12:49:44 -0000	1.57
@@ -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.eclass,v 1.56 2011/08/22 04:46:31 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.57 2011/09/12 12:49:44 mgorny Exp $
 
 # @DEPRECATED
 # This eclass has been superseded by git-2 eclass.
@@ -195,6 +195,10 @@
 git_fetch() {
 	debug-print-function ${FUNCNAME} "$@"
 
+	eqawarn "git.eclass is deprecated."
+	eqawarn "Please update your ebuilds to use git-2 instead. For details, see"
+	eqawarn "http://archives.gentoo.org/gentoo-dev/msg_b7ba363cae580845819ae3501fb157e9.xml"
+
 	local GIT_DIR EGIT_CLONE_DIR oldsha1 cursha1 extra_clone_opts upstream_branch
 	[[ -z ${EGIT_HAS_SUBMODULES} ]] && export GIT_DIR
 






^ permalink raw reply	[flat|nested] 48+ messages in thread

end of thread, other threads:[~2011-09-12 12:49 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-06 20:47 [gentoo-commits] gentoo-x86 commit in eclass: git.eclass Tomas Chvatal (scarabeus)
  -- strict thread matches above, loose matches on Subject: below --
2011-09-12 12:49 Michal Gorny (mgorny)
2011-04-20 10:57 Tomas Chvatal (scarabeus)
2011-04-15  8:57 Marijn Schouten (hkbst)
2011-03-19 15:06 Tomas Chvatal (scarabeus)
2011-02-02 19:26 Ulrich Mueller (ulm)
2011-02-01 14:22 Tomas Chvatal (scarabeus)
2010-12-29 14:05 Michal Gorny (mgorny)
2010-07-27 12:39 Maciej Mrozowski (reavertm)
2010-07-26  3:24 Maciej Mrozowski (reavertm)
2010-07-26  2:51 Maciej Mrozowski (reavertm)
2010-07-26  2:22 Maciej Mrozowski (reavertm)
2010-03-17 15:17 Sebastian Pipping (sping)
2010-02-24  1:16 Jonathan Callen (abcd)
2010-02-23  0:43 Jonathan Callen (abcd)
2010-01-31 10:13 Tomas Chvatal (scarabeus)
2010-01-31 10:05 Tomas Chvatal (scarabeus)
2010-01-25 17:15 Tomas Chvatal (scarabeus)
2010-01-23 15:46 Tomas Chvatal (scarabeus)
2010-01-22  9:32 Tomas Chvatal (scarabeus)
2010-01-13 22:15 Tomas Chvatal (scarabeus)
2010-01-13 20:04 Tomas Chvatal (scarabeus)
2009-12-29 17:18 Tomas Chvatal (scarabeus)
2009-12-16 20:35 Tomas Chvatal (scarabeus)
2009-10-20 10:05 Tomas Chvatal (scarabeus)
2009-10-11 11:40 Markus Meier (maekke)
2009-09-04  8:00 Tomas Chvatal (scarabeus)
2009-08-24 21:48 Tomas Chvatal (scarabeus)
2009-05-14 13:52 Tomas Chvatal (scarabeus)
2009-05-09 15:10 Tomas Chvatal (scarabeus)
2009-04-14 21:46 Tomas Chvatal (scarabeus)
2009-04-13 15:35 Tomas Chvatal (scarabeus)
2009-04-10 19:33 Tomas Chvatal (scarabeus)
2009-04-08 16:46 Tomas Chvatal (scarabeus)
2009-04-07 15:03 Tomas Chvatal (scarabeus)
2009-04-07 14:39 Tomas Chvatal (scarabeus)
2009-04-06  0:00 Robin H. Johnson (robbat2)
2009-04-05 20:22 Tomas Chvatal (scarabeus)
2009-03-19 11:51 Tomas Chvatal (scarabeus)
2009-02-19 17:07 Tomas Chvatal (scarabeus)
2008-06-16 11:22 Bo Oersted Andresen (zlin)
2008-06-16  7:51 Bo Oersted Andresen (zlin)
2008-06-15 17:47 Bo Oersted Andresen (zlin)
2008-06-05 15:44 Bo Oersted Andresen (zlin)
2008-03-30  5:52 Robin H. Johnson (robbat2)
2008-03-30  5:39 Robin H. Johnson (robbat2)
2007-12-27  1:02 Robin H. Johnson (robbat2)
2007-11-14 20:43 Fernando J. Pereda (ferdy)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox