From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 77EA013873B for ; Sun, 2 Mar 2014 11:49:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3DA17E0ABF; Sun, 2 Mar 2014 11:49:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B850DE0ABF for ; Sun, 2 Mar 2014 11:49:07 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 61E5C33FB4D for ; Sun, 2 Mar 2014 11:49:06 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2279) id 32A142004C; Sun, 2 Mar 2014 11:49:05 +0000 (UTC) From: "Michal Gorny (mgorny)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, mgorny@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: ChangeLog git-r3.eclass X-VCS-Directories: eclass X-VCS-Committer: mgorny X-VCS-Committer-Name: Michal Gorny Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20140302114905.32A142004C@flycatcher.gentoo.org> Date: Sun, 2 Mar 2014 11:49:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 57d2e0bd-5e22-4f85-b3ce-6d616392e3b2 X-Archives-Hash: 2c866cd4f1d72888e73c23055efef382 mgorny 14/03/02 11:49:05 Modified: ChangeLog git-r3.eclass Log: Add EGIT_MIN_CLONE_TYPE to control clone type via ebuilds. Revision Changes Path 1.1160 eclass/ChangeLog file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1160&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1160&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1159&r2=1.1160 Index: ChangeLog =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v retrieving revision 1.1159 retrieving revision 1.1160 diff -u -r1.1159 -r1.1160 --- ChangeLog 2 Mar 2014 11:48:28 -0000 1.1159 +++ ChangeLog 2 Mar 2014 11:49:05 -0000 1.1160 @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1159 2014/03/02 11:48:28 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1160 2014/03/02 11:49:05 mgorny Exp $ + + 02 Mar 2014; Michał Górny git-r3.eclass: + Add EGIT_MIN_CLONE_TYPE to control clone type via ebuilds. 02 Mar 2014; Michał Górny git-r3.eclass: Auto-unshallow when fetching by commit hash. 1.35 eclass/git-r3.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.35&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.35&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.34&r2=1.35 Index: git-r3.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- git-r3.eclass 2 Mar 2014 11:48:28 -0000 1.34 +++ git-r3.eclass 2 Mar 2014 11:49:05 -0000 1.35 @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.34 2014/03/02 11:48:28 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.35 2014/03/02 11:49:05 mgorny Exp $ # @ECLASS: git-r3.eclass # @MAINTAINER: @@ -58,6 +58,19 @@ # embedded systems with limited disk space. : ${EGIT_CLONE_TYPE:=single} +# @ECLASS-VARIABLE: EGIT_MIN_CLONE_TYPE +# @DESCRIPTION: +# 'Minimum' clone type supported by the ebuild. Takes same values +# as EGIT_CLONE_TYPE. When user sets a type that's 'lower' (that is, +# later on the list) than EGIT_MIN_CLONE_TYPE, the eclass uses +# EGIT_MIN_CLONE_TYPE instead. +# +# A common case is to use 'single' whenever the build system requires +# access to full branch history or the remote (Google Code) does not +# support shallow clones. Please use sparingly, and to fix fatal errors +# rather than 'non-pretty versions'. +: ${EGIT_MIN_CLONE_TYPE:=shallow} + # @ECLASS-VARIABLE: EGIT3_STORE_DIR # @DESCRIPTION: # Storage directory for git sources. @@ -140,6 +153,24 @@ *) die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}" esac + case "${EGIT_MIN_CLONE_TYPE}" in + shallow) + ;; + single) + if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then + einfo "git-r3: ebuild needs to be cloned in 'single' mode, adjusting" + EGIT_CLONE_TYPE=single + fi + ;; + mirror) + if [[ ${EGIT_CLONE_TYPE} != mirror ]]; then + einfo "git-r3: ebuild needs to be cloned in 'mirror' mode, adjusting" + EGIT_CLONE_TYPE=mirror + fi + ;; + *) + die "Invalid EGIT_MIN_CLONE_TYPE=${EGIT_MIN_CLONE_TYPE}" + esac local esc_pn livevar esc_pn=${PN//[-+]/_}