1 |
This is bad idea. It breaks live rebuild and other stuff. You should just |
2 |
clone each repo yourself, see how i did in libreoffice ebuild |
3 |
Dne 27.11.2012 20:28 "Sergei Trofimovich" <slyfox@g.o> napsal(a): |
4 |
|
5 |
> EGIT_REPO_URI="https://github.com/ghc/ghc.git" |
6 |
> requires user to run './sync-all fetch / ./sync-all pull' |
7 |
> after actual 'git pull', which fetches 20 more repos for code changes. |
8 |
> Upstream does not use submodules. |
9 |
> |
10 |
> The patch injects user's callback right before 'git-2_move_source'. |
11 |
> Currently I abuse 'git-2_gc': |
12 |
> |
13 |
> Original ebuild: |
14 |
> https://github.com/gentoo-haskell/gentoo-haskell/blob/master/dev-lang/ghc/ghc-9999.ebuild#L180 |
15 |
> |
16 |
> Signed-off-by: Sergei Trofimovich <slyfox@g.o> |
17 |
> --- |
18 |
> git-2.eclass | 24 ++++++++++++++++++++++++ |
19 |
> 1 file changed, 24 insertions(+) |
20 |
> |
21 |
> diff --git a/git-2.eclass b/git-2.eclass |
22 |
> index 1a96978..1bacef5 100644 |
23 |
> --- a/git-2.eclass |
24 |
> +++ b/git-2.eclass |
25 |
> @@ -569,6 +569,29 @@ git-2_cleanup() { |
26 |
> unset EGIT_LOCAL_NONBARE |
27 |
> } |
28 |
> |
29 |
> + |
30 |
> +# @FUNCTION: git-2_fetch_user |
31 |
> +# @DESCRIPTION: |
32 |
> +# User-overridable callback allow user to update |
33 |
> +# sources in "${EGIT_DIR}" (current location). |
34 |
> +# Does nothing by default |
35 |
> +git-2_fetch_user() { |
36 |
> + : |
37 |
> +} |
38 |
> + |
39 |
> +# @FUNCTION: git-2_post_fetch |
40 |
> +# @INTERNAL |
41 |
> +# Internal function calling user's callback |
42 |
> +# when "${EGIT_DIR}" needs more actions, than |
43 |
> +# simple fetch. |
44 |
> +git-2_post_fetch() { |
45 |
> + debug-print-function ${FUNCNAME} "$@" |
46 |
> + |
47 |
> + pushd "${EGIT_DIR}" > /dev/null |
48 |
> + git-2_fetch_user |
49 |
> + popd > /dev/null |
50 |
> +} |
51 |
> + |
52 |
> # @FUNCTION: git-2_src_unpack |
53 |
> # @DESCRIPTION: |
54 |
> # Default git src_unpack function. |
55 |
> @@ -581,6 +604,7 @@ git-2_src_unpack() { |
56 |
> git-2_fetch "$@" |
57 |
> git-2_gc |
58 |
> git-2_submodules |
59 |
> + git-2_post_fetch |
60 |
> git-2_move_source |
61 |
> git-2_branch |
62 |
> git-2_bootstrap |
63 |
> -- |
64 |
> 1.8.0 |
65 |
> |
66 |
> |
67 |
> |