Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm-install: do_npm_*(): cd to ${B} #60

Merged
merged 1 commit into from
Dec 21, 2016
Merged

npm-install: do_npm_*(): cd to ${B} #60

merged 1 commit into from
Dec 21, 2016

Conversation

geomatsi
Copy link
Contributor

Change working directory to ${B} prior to running tasks from npm-install
class. This change is needed due to bitbake commit
67a7b8b021badc17d8fdf447c250e79d291e75f7.

Without this change do_npm_* functions are executed with ${TOPDIR}
as a rootdir. As a result they fail to find package.json.

Signed-off-by: Sergey Matyukevich [email protected]

@imyller
Copy link
Owner

imyller commented Dec 12, 2016

Looks good.

@geomatsi
Copy link
Contributor Author

Related bitbake change has been introduced after krogoth release. So this fix is relevant for morty and upstream only.

@geomatsi
Copy link
Contributor Author

BTW npm-install-global seems to be working fine w/o this fix. At least I didn't observed any issues building node-red using morty branches.

@imyller
Copy link
Owner

imyller commented Dec 12, 2016

Are you sure package.json is always in ${B} and not in ${S}?

@geomatsi
Copy link
Contributor Author

IIUC this is the case for npm-install class: B is assigned to ${S} on top of npm-install.bblcass file.

Change working directory to ${S} prior to running tasks from npm-install
class. This change is needed due to bitbake commit
67a7b8b021badc17d8fdf447c250e79d291e75f7.

Without this change do_npm_* functions are executed with ${TOPDIR}
as a rootdir. As a result they fail to find package.json.

Signed-off-by: Sergey Matyukevich <[email protected]>
@geomatsi
Copy link
Contributor Author

geomatsi commented Dec 13, 2016

PR update: v1 -> v2

Make change more future-proof: replace ${B} by ${S} since package.json normally belongs to source directory rather than to build directory.

@imyller imyller merged commit 34c086b into imyller:morty Dec 21, 2016
@geomatsi geomatsi deleted the morty branch December 21, 2016 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants