golang-vcs.eclass: fix destination path for source files
authorWilliam Hubbs <williamh@gentoo.org>
Sun, 23 Aug 2015 23:29:12 +0000 (18:29 -0500)
committerWilliam Hubbs <williamh@gentoo.org>
Sun, 23 Aug 2015 23:34:57 +0000 (18:34 -0500)
This fixes the path under ${WORKDIR} where we are copying the source
files to after they are retrieved from the vcs with "go get".

eclass/golang-vcs.eclass

index baf3adf51a61d56cabc265cd8e1059793e594251..182c4246f63fb2838d868af6a5f0bb8381f084ac 100644 (file)
@@ -109,13 +109,14 @@ _golang-vcs_fetch() {
 
                [[ -n ${EVCS_UMASK} ]] && eumask_pop
        fi
-       set -- mkdir -p "${WORKDIR}/${P}/src/${EGO_PN%/...}"
+       local go_srcpath="${WORKDIR}/${P}/src/${EGO_PN%/...}"
+       set -- mkdir -p "${go_srcpath}"
        echo "$@"
-       "$@" || die "Unable to create ${WORKDIR}/${P}/src"
+       "$@" || die "Unable to create ${go_srcpath}"
        set -- cp -r    "${EGO_STORE_DIR}/src/${EGO_PN%/...}" \
-               "${WORKDIR}/${P}/src/${EGO_PN%/...}"
+               "${go_srcpath}/.."
        echo "$@"
-       "$@" || die "Unable to copy sources to ${WORKDIR}/${P}"
+       "$@" || die "Unable to copy sources to ${go_srcpath}"
        return 0
 }