imyller / meta-nodejs

OpenEmbedded layer for latest Node.js releases
MIT License
79 stars 87 forks source link

GIT Clone and Incorrect Install Directory #61

Closed ovaar closed 7 years ago

ovaar commented 7 years ago

I'm trying to clone a private repository as :

LICENSE = "CLOSED"
DEPENDS += " nodejs"
RDEPENDS_${PN} += " nodejs"

SRCREV = "${AUTOREV}"
SRC_URI = "git://myreposity.com/software.git;branch=master"

inherit npm-install gulp

Now I want to run npm-install and gulp against the freshly cloned repo. Only the S variable doens't point to the right directory. My repository ends up in build/downloads/git/myreposity but the actual sources within this directory are unable to be found. Also the npm-install and gulp are searching for package.json and gulpfile.js in my build directory instead of in the directory of SRC_URI

I'm not sure how to fix this. Hoping someone could help me.

imyller commented 7 years ago

Hi, as far as I know, git:// sources are unpacked in ${WORKDIR}\git

So you could try adding following to your recipe:

S = "${WORKDIR}/git"

Btw. Your repository ends up in downloads directory too (for caching by Bitbake fetcher), but most likely package is being built in the ${WORKDIR} (inside Bitbake work dir). Git master branch of your repository is then unpacked to ${WORKDIR}/git and removed after the build (if rm_work class is enabled).