1 |
arfrever 09/05/10 20:33:38 |
2 |
|
3 |
Modified: subversion.eclass |
4 |
Log: |
5 |
Add possibility of not including Subversion in DEPEND. |
6 |
Run 'svn upgrade' to automatically upgrade working copies. |
7 |
|
8 |
Revision Changes Path |
9 |
1.67 eclass/subversion.eclass |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.67&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.67&content-type=text/plain |
13 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.66&r2=1.67 |
14 |
|
15 |
Index: subversion.eclass |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v |
18 |
retrieving revision 1.66 |
19 |
retrieving revision 1.67 |
20 |
diff -u -r1.66 -r1.67 |
21 |
--- subversion.eclass 29 Apr 2009 22:47:08 -0000 1.66 |
22 |
+++ subversion.eclass 10 May 2009 20:33:38 -0000 1.67 |
23 |
@@ -1,6 +1,6 @@ |
24 |
# Copyright 1999-2009 Gentoo Foundation |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.66 2009/04/29 22:47:08 scarabeus Exp $ |
27 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.67 2009/05/10 20:33:38 arfrever Exp $ |
28 |
|
29 |
# @ECLASS: subversion.eclass |
30 |
# @MAINTAINER: |
31 |
@@ -19,19 +19,24 @@ |
32 |
|
33 |
ESVN="${ECLASS}" |
34 |
|
35 |
-EXPORTED_FUNCTIONS="src_unpack pkg_preinst" |
36 |
case "${EAPI:-0}" in |
37 |
- 2) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;; |
38 |
- 1|0) ;; |
39 |
- *) die "Unknown EAPI, Bug eclass maintainers." ;; |
40 |
+ 0|1) |
41 |
+ EXPORT_FUNCTIONS src_unpack pkg_preinst |
42 |
+ ;; |
43 |
+ *) |
44 |
+ EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst |
45 |
+ ;; |
46 |
esac |
47 |
-EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS} |
48 |
|
49 |
DESCRIPTION="Based on the ${ECLASS} eclass" |
50 |
|
51 |
-DEPEND="dev-util/subversion |
52 |
+SUBVERSION_DEPEND="dev-util/subversion |
53 |
net-misc/rsync" |
54 |
|
55 |
+if [[ -z "${ESVN_DISABLE_DEPENDENCIES}" ]]; then |
56 |
+ DEPEND="${SUBVERSION_DEPEND}" |
57 |
+fi |
58 |
+ |
59 |
# @ECLASS-VARIABLE: ESVN_STORE_DIR |
60 |
# @DESCRIPTION: |
61 |
# subversion sources store directory. Users may override this in /etc/make.conf |
62 |
@@ -139,6 +144,12 @@ |
63 |
# don't export the working copy to S. |
64 |
ESVN_RESTRICT="${ESVN_RESTRICT:-}" |
65 |
|
66 |
+# @ECLASS-VARIABLE: ESVN_DISABLE_DEPENDENCIES |
67 |
+# @DESCRIPTION: |
68 |
+# Set this variable to a non-empty value to disable the automatic inclusion of |
69 |
+# Subversion in dependencies. |
70 |
+ESVN_DISABLE_DEPENDENCIES="${ESVN_DISABLE_DEPENDENCIES:-}" |
71 |
+ |
72 |
# @ECLASS-VARIABLE: ESVN_OFFLINE |
73 |
# @DESCRIPTION: |
74 |
# Set this variable to a non-empty value to disable the automatic updating of |
75 |
@@ -186,8 +197,7 @@ |
76 |
|
77 |
case "${protocol}" in |
78 |
http|https) |
79 |
- if ! built_with_use --missing true -o dev-util/subversion webdav-neon webdav-serf || \ |
80 |
- built_with_use --missing false dev-util/subversion nowebdav; then |
81 |
+ if ! built_with_use -o dev-util/subversion webdav-neon webdav-serf; then |
82 |
echo |
83 |
eerror "In order to emerge this package, you need to" |
84 |
eerror "reinstall Subversion with support for WebDAV." |
85 |
@@ -250,14 +260,16 @@ |
86 |
fi |
87 |
|
88 |
elif [[ -n ${ESVN_OFFLINE} ]]; then |
89 |
- svn cleanup "${wc_path}" |
90 |
+ svn upgrade "${wc_path}" &>/dev/null |
91 |
+ svn cleanup "${wc_path}" &>/dev/null |
92 |
subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy." |
93 |
if [[ -n ${ESVN_REVISION} && ${ESVN_REVISION} != ${ESVN_WC_REVISION} ]]; then |
94 |
die "${ESVN}: You requested off-line updating and revision ${ESVN_REVISION} but only revision ${ESVN_WC_REVISION} is available locally." |
95 |
fi |
96 |
einfo "Fetching disabled: Using existing repository copy at revision ${ESVN_WC_REVISION}." |
97 |
else |
98 |
- svn cleanup "${wc_path}" |
99 |
+ svn upgrade "${wc_path}" &>/dev/null |
100 |
+ svn cleanup "${wc_path}" &>/dev/null |
101 |
subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy." |
102 |
|
103 |
local esvn_up_freq= |
104 |
@@ -375,7 +387,9 @@ |
105 |
# Default src_unpack. Fetch and, in older EAPIs, bootstrap. |
106 |
subversion_src_unpack() { |
107 |
subversion_fetch || die "${ESVN}: unknown problem occurred in subversion_fetch." |
108 |
- has src_prepare ${EXPORTED_FUNCTIONS} || subversion_src_prepare |
109 |
+ if has "${EAPI:-0}" 0 1; then |
110 |
+ subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap." |
111 |
+ fi |
112 |
} |
113 |
|
114 |
# @FUNCTION: subversion_src_prepare |