1 |
mgorny 14/03/02 11:49:05 |
2 |
|
3 |
Modified: ChangeLog git-r3.eclass |
4 |
Log: |
5 |
Add EGIT_MIN_CLONE_TYPE to control clone type via ebuilds. |
6 |
|
7 |
Revision Changes Path |
8 |
1.1160 eclass/ChangeLog |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1160&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1160&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1159&r2=1.1160 |
13 |
|
14 |
Index: ChangeLog |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v |
17 |
retrieving revision 1.1159 |
18 |
retrieving revision 1.1160 |
19 |
diff -u -r1.1159 -r1.1160 |
20 |
--- ChangeLog 2 Mar 2014 11:48:28 -0000 1.1159 |
21 |
+++ ChangeLog 2 Mar 2014 11:49:05 -0000 1.1160 |
22 |
@@ -1,6 +1,9 @@ |
23 |
# ChangeLog for eclass directory |
24 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1159 2014/03/02 11:48:28 mgorny Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1160 2014/03/02 11:49:05 mgorny Exp $ |
27 |
+ |
28 |
+ 02 Mar 2014; Michał Górny <mgorny@g.o> git-r3.eclass: |
29 |
+ Add EGIT_MIN_CLONE_TYPE to control clone type via ebuilds. |
30 |
|
31 |
02 Mar 2014; Michał Górny <mgorny@g.o> git-r3.eclass: |
32 |
Auto-unshallow when fetching by commit hash. |
33 |
|
34 |
|
35 |
|
36 |
1.35 eclass/git-r3.eclass |
37 |
|
38 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.35&view=markup |
39 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.35&content-type=text/plain |
40 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.34&r2=1.35 |
41 |
|
42 |
Index: git-r3.eclass |
43 |
=================================================================== |
44 |
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v |
45 |
retrieving revision 1.34 |
46 |
retrieving revision 1.35 |
47 |
diff -u -r1.34 -r1.35 |
48 |
--- git-r3.eclass 2 Mar 2014 11:48:28 -0000 1.34 |
49 |
+++ git-r3.eclass 2 Mar 2014 11:49:05 -0000 1.35 |
50 |
@@ -1,6 +1,6 @@ |
51 |
# Copyright 1999-2014 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.34 2014/03/02 11:48:28 mgorny Exp $ |
54 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.35 2014/03/02 11:49:05 mgorny Exp $ |
55 |
|
56 |
# @ECLASS: git-r3.eclass |
57 |
# @MAINTAINER: |
58 |
@@ -58,6 +58,19 @@ |
59 |
# embedded systems with limited disk space. |
60 |
: ${EGIT_CLONE_TYPE:=single} |
61 |
|
62 |
+# @ECLASS-VARIABLE: EGIT_MIN_CLONE_TYPE |
63 |
+# @DESCRIPTION: |
64 |
+# 'Minimum' clone type supported by the ebuild. Takes same values |
65 |
+# as EGIT_CLONE_TYPE. When user sets a type that's 'lower' (that is, |
66 |
+# later on the list) than EGIT_MIN_CLONE_TYPE, the eclass uses |
67 |
+# EGIT_MIN_CLONE_TYPE instead. |
68 |
+# |
69 |
+# A common case is to use 'single' whenever the build system requires |
70 |
+# access to full branch history or the remote (Google Code) does not |
71 |
+# support shallow clones. Please use sparingly, and to fix fatal errors |
72 |
+# rather than 'non-pretty versions'. |
73 |
+: ${EGIT_MIN_CLONE_TYPE:=shallow} |
74 |
+ |
75 |
# @ECLASS-VARIABLE: EGIT3_STORE_DIR |
76 |
# @DESCRIPTION: |
77 |
# Storage directory for git sources. |
78 |
@@ -140,6 +153,24 @@ |
79 |
*) |
80 |
die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}" |
81 |
esac |
82 |
+ case "${EGIT_MIN_CLONE_TYPE}" in |
83 |
+ shallow) |
84 |
+ ;; |
85 |
+ single) |
86 |
+ if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then |
87 |
+ einfo "git-r3: ebuild needs to be cloned in 'single' mode, adjusting" |
88 |
+ EGIT_CLONE_TYPE=single |
89 |
+ fi |
90 |
+ ;; |
91 |
+ mirror) |
92 |
+ if [[ ${EGIT_CLONE_TYPE} != mirror ]]; then |
93 |
+ einfo "git-r3: ebuild needs to be cloned in 'mirror' mode, adjusting" |
94 |
+ EGIT_CLONE_TYPE=mirror |
95 |
+ fi |
96 |
+ ;; |
97 |
+ *) |
98 |
+ die "Invalid EGIT_MIN_CLONE_TYPE=${EGIT_MIN_CLONE_TYPE}" |
99 |
+ esac |
100 |
|
101 |
local esc_pn livevar |
102 |
esc_pn=${PN//[-+]/_} |