Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] git-2.eclass review phase one
Date: Sun, 06 Feb 2011 16:22:11
Message-Id: 19790.51851.241905.538535@a1i15.kph.uni-mainz.de
In Reply to: [gentoo-dev] git-2.eclass review phase one by "Tomáš Chvátal"
1 > # Eclass for easing maitenance of live ebuilds using git as remote repositories.
2
3 Please keep lines below 80 characters if possible.
4
5 > # @ECLASS-VARIABLE: ESCM_STORE_DIR
6 > # @DESCRIPTION:
7 > # Storage directory for git sources.
8 > : ${ESCM_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/egit-src"}
9
10 Why is this renamed? It was EGIT_STORE_DIR before, and I think that
11 was more appropriate, especially when it's named egit-src.
12
13 > # @ECLASS-VARIABLE: ESCM_FETCH_CMD
14 > # @ECLASS-VARIABLE: ESCM_UPDATE_CMD
15 > # @ECLASS-VARIABLE: ESCM_OPTIONS
16 > # @ECLASS-VARIABLE: ESCM_MASTER
17 > # @ECLASS-VARIABLE: ESCM_REPO_URI
18 > # @ECLASS-VARIABLE: ESCM_BRANCH
19 > # @ECLASS-VARIABLE: ESCM_COMMIT
20
21 Same for all of these, they are all specific to git and should
22 therefore be named EGIT_*. Other VCSs have different concepts for some
23 of them.
24
25 > if [[ -z ${ESCM_REPO_URI%%:*} ]] ; then
26 > case ${ESCM_REPO_URI%%:*} in
27 > git*|http|https|rsync|ssh) ;;
28 > *) die "Protocol for fetch from "${ESCM_REPO_URI%:*}" is not yet implemented in eclass." ;;
29 > esac
30 > fi
31
32 This test won't work as intended.
33
34 > addwrite "${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}"
35 > mkdir -p "${ESCM_STORE_DIR}" \
36
37 Is it guaranteed that ${ESCM_STORE_DIR} is a subdir of
38 ${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}} if the former is freely
39 configurable?
40
41 Ulrich