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-9999.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.9999.ebuild:                   
EGIT_SOURCEDIR="${WORKDIR}/${PN}-${mod}-${PV}"
./app-office/libreoffice/libreoffice-3.6.9999.ebuild:           unset 
EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH
./app-office/libreoffice/libreoffice-9999-r2.ebuild:                    
EGIT_SOURCEDIR="${WORKDIR}/${PN}-${mod}-${PV}"
./app-office/libreoffice/libreoffice-9999-r2.ebuild:            unset 
EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH
./dev-embedded/urjtag/urjtag-9999.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-9999.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-9999.ebuild:EGIT_SOURCEDIR="${S}"
./net-im/psi/psi-9999.ebuild:                           
EGIT_SOURCEDIR="${WORKDIR}/psi-l10n/${x}" git-2_src_unpack
./net-im/psi/psi-9999.ebuild:           EGIT_SOURCEDIR="${WORKDIR}/psi-plus" \
./net-im/psi/psi-9999.ebuild:                   
EGIT_SOURCEDIR="${WORKDIR}/resources" \
./net-misc/youtube-viewer/youtube-viewer-9999.ebuild:EGIT_SOURCEDIR="${WORKDIR}"
./sec-policy/selinux-base-policy/selinux-base-policy-9999.ebuild:EGIT_SOURCEDIR="${WORKDIR}/refpolicy"
./sec-policy/selinux-base/selinux-base-9999.ebuild:EGIT_SOURCEDIR="${WORKDIR}/refpolicy"
./sys-fs/yaffs-utils/yaffs-utils-9999.ebuild:EGIT_SOURCEDIR=${WORKDIR}
./sys-fs/yaffs2-utils/yaffs2-utils-9999.ebuild:EGIT_SOURCEDIR=${WORKDIR}
./sys-libs/glibc/files/eblits/src_unpack.eblit:                 
EGIT_SOURCEDIR=${EGIT_SOURCEDIRS[$i]}
./sys-libs/glibc/glibc-2.14.1-r2.ebuild:        EGIT_SOURCEDIRS=( "${S}" 
"${S}/ports" )
./sys-libs/glibc/glibc-2.14.1-r3.ebuild:        EGIT_SOURCEDIRS=( "${S}" 
"${S}/ports" )
./sys-libs/glibc/glibc-2.14.ebuild:     EGIT_SOURCEDIRS=( "${S}" "${S}/ports" )
./sys-libs/glibc/glibc-2.15-r1.ebuild:  EGIT_SOURCEDIRS=( "${S}" "${S}/ports" )
./sys-libs/glibc/glibc-2.15-r2.ebuild:  EGIT_SOURCEDIRS=( "${S}" "${S}/ports" )
./sys-libs/glibc/glibc-2.15-r3.ebuild:  EGIT_SOURCEDIRS=( "${S}" "${S}/ports" )
./sys-libs/glibc/glibc-9999.ebuild:     EGIT_SOURCEDIRS="${S}"
./sys-libs/glibc/glibc-2.16.0.ebuild:   EGIT_SOURCEDIRS=( "${S}" "${S}/ports" )
./www-client/xxxterm/xxxterm-1.1103-r1.ebuild:  
EGIT_SOURCEDIR="${WORKDIR}/${MY_P}"
./www-client/xxxterm/xxxterm-9999.ebuild:       
EGIT_SOURCEDIR="${WORKDIR}/${MY_P}"

Attachment: signature.asc
Description: PGP signature

Reply via email to