On Tue, 27 Nov 2012 12:18:51 -0800
Davide Pesavento p...@gentoo.org wrote:
On Tue, Nov 27, 2012 at 11:22 AM, Sergei Trofimovich sly...@gentoo.org
wrote:
Before the patch I had to move subdir(not very reliable):
EGIT_REPO_URI=git://github.com/UU-ComputerScience/uhc.git
src_prepare() {
mv EHC/* ./ || die
}
After the patch i can define it the usual way:
EGIT_REPO_URI=git://github.com/UU-ComputerScience/uhc.git
S=${WORKDIR}/${P}/EHC
Original ebuild:
https://github.com/gentoo-haskell/gentoo-haskell/blob/master/dev-lang/uhc/uhc-.ebuild#L27
Signed-off-by: Sergei Trofimovich sly...@gentoo.org
---
git-2.eclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-2.eclass b/git-2.eclass
index 1ecc633..1a96978 100644
--- a/git-2.eclass
+++ b/git-2.eclass
@@ -21,7 +21,7 @@ DEPEND=dev-vcs/git
# This variable specifies destination where the cloned
# data are copied to.
#
-# EGIT_SOURCEDIR=${S}
+# EGIT_SOURCEDIR=${WORKDIR}/${P}
# @ECLASS-VARIABLE: EGIT_STORE_DIR
# @DESCRIPTION:
@@ -132,7 +132,7 @@ git-2_init_variables() {
local esc_pn liverepo livebranch livecommit
esc_pn=${PN//[-+]/_}
- : ${EGIT_SOURCEDIR=${S}}
+ : ${EGIT_SOURCEDIR=${WORKDIR}/${P}}
: ${EGIT_STORE_DIR:=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/egit-src}
--
1.8.0
While in theory this makes sense, it also has the potential to break
ebuilds setting S=${WORKDIR}/foo and then expecting the sources to
be inside foo. IOW it's not backward compatible, is it?
Right, it's not. I thought that default makes no sense as it relocates
git repo, but not the tarballs (if yet in SRC_URI). It does make sense
for submodules though, but you need to override EGIT_SOURCEDIR
for them anyway.
EGIT_SOURCEDIR users in tree are quite fun: [attached]
All try to set it to ${WORKDIR}/${P} in one form or another.
I didn't check actual users before. Seems there is a possibility of breakage.
Please ignore both patches. We'll keep local modifications in haskell overlay.
Sorry for the noise.
--
Sergei
./app-office/libreoffice/libreoffice-3.5.7.2.ebuild:
EGIT_SOURCEDIR=${WORKDIR}/${PN}-${mod}-${PV}
./app-office/libreoffice/libreoffice-3.5.7.2.ebuild:unset
EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH
./app-office/libreoffice/libreoffice-3.6.3.2.ebuild:
EGIT_SOURCEDIR=${WORKDIR}/${PN}-${mod}-${PV}
./app-office/libreoffice/libreoffice-3.6.3.2.ebuild:unset
EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH
./app-office/libreoffice/libreoffice-3.6..ebuild:
EGIT_SOURCEDIR=${WORKDIR}/${PN}-${mod}-${PV}
./app-office/libreoffice/libreoffice-3.6..ebuild: unset
EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH
./app-office/libreoffice/libreoffice--r2.ebuild:
EGIT_SOURCEDIR=${WORKDIR}/${PN}-${mod}-${PV}
./app-office/libreoffice/libreoffice--r2.ebuild:unset
EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH
./dev-embedded/urjtag/urjtag-.ebuild: EGIT_SOURCEDIR=${WORKDIR}
./dev-perl/Lab-Measurement/Lab-Measurement-3.00.ebuild: EGIT_SOURCEDIR=${S}
./dev-perl/Lab-Measurement/Lab-Measurement-3.10.ebuild: EGIT_SOURCEDIR=${S}
./dev-perl/Lab-Measurement/Lab-Measurement-.ebuild: EGIT_SOURCEDIR=${S}
./dev-scheme/racket/racket-5.1.2.ebuild:EGIT_SOURCEDIR=${WORKDIR}/${P}
./dev-scheme/racket/racket-5.2.1.ebuild:EGIT_SOURCEDIR=${WORKDIR}/${P}
./dev-scheme/racket/racket-5.3.1.ebuild:EGIT_SOURCEDIR=${WORKDIR}/${P}
./eclass/selinux-policy-2.eclass:
EGIT_SOURCEDIR=${WORKDIR}/refpolicy;;
./eclass/git-2.eclass:# @ECLASS-VARIABLE: EGIT_SOURCEDIR
./eclass/git-2.eclass:# EGIT_SOURCEDIR=${S}
./eclass/git-2.eclass: : ${EGIT_SOURCEDIR=${S}}
./eclass/git-2.eclass: debug-print ${FUNCNAME}: working in
\${EGIT_SOURCEDIR}\
./eclass/git-2.eclass: pushd ${EGIT_SOURCEDIR} /dev/null
./eclass/git-2.eclass:# Internal function moving sources from the EGIT_DIR to
EGIT_SOURCEDIR dir.
./eclass/git-2.eclass: debug-print ${FUNCNAME}: ${MOVE_COMMAND}
\${EGIT_DIR}\ \${EGIT_SOURCEDIR}\
./eclass/git-2.eclass: mkdir -p ${EGIT_SOURCEDIR} \
./eclass/git-2.eclass: || die ${FUNCNAME}: failed to create
${EGIT_SOURCEDIR}
./eclass/git-2.eclass: ${MOVE_COMMAND} ${EGIT_SOURCEDIR} \
./eclass/git-2.eclass: || die ${FUNCNAME}: sync to
\${EGIT_SOURCEDIR}\ failed
./eclass/git-2.eclass: pushd ${EGIT_SOURCEDIR} /dev/null
./eclass/git-2.eclass: echo Unpacked to ${EGIT_SOURCEDIR}
./net-analyzer/gsm-receiver/gsm-receiver-.ebuild:EGIT_SOURCEDIR=${S}
./net-im/psi/psi-.ebuild:
EGIT_SOURCEDIR=${WORKDIR}/psi-l10n/${x} git-2_src_unpack
./net-im/psi/psi-.ebuild: EGIT_SOURCEDIR=${WORKDIR}/psi-plus \
./net-im/psi/psi-.ebuild:
EGIT_SOURCEDIR=${WORKDIR}/resources \