Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] classes/npm: use npm install to do installation
@ 2016-10-31  4:02 Paul Eggleton
  2016-10-31  4:02 ` [PATCH 1/1] " Paul Eggleton
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Eggleton @ 2016-10-31  4:02 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit b18fa5f2f2f46afc6fdc58f4d29679dea9c36c43:

  Remove LIC_FILES_CHKSUM from recipes without SRC_URI (2016-10-28 11:27:33 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib paule/npm-install-fix
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/npm-install-fix

Paul Eggleton (1):
  classes/npm: use npm install to do installation

 meta/classes/npm.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

-- 
2.5.5



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] classes/npm: use npm install to do installation
  2016-10-31  4:02 [PATCH 0/1] classes/npm: use npm install to do installation Paul Eggleton
@ 2016-10-31  4:02 ` Paul Eggleton
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggleton @ 2016-10-31  4:02 UTC (permalink / raw)
  To: openembedded-core

Using "npm install" instead of "cp -a" is the more correct thing to be
doing here, and ensures that symlinks for executable scripts are put
into ${prefix}/bin. (I'd prefer ${bindir}, but npm does not allow
specifying paths at that level - only a prefix.)

Fixes [YOCTO #10460].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/npm.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass
index fce4c11..43228c5 100644
--- a/meta/classes/npm.bbclass
+++ b/meta/classes/npm.bbclass
@@ -33,7 +33,11 @@ npm_do_compile() {
 
 npm_do_install() {
 	mkdir -p ${NPM_INSTALLDIR}/
-	cp -a ${S}/* ${NPM_INSTALLDIR}/ --no-preserve=ownership
+	npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry
+	if [ -d ${D}${prefix}/etc ] ; then
+		# This will be empty
+		rmdir ${D}${prefix}/etc
+	fi
 }
 
 python populate_packages_prepend () {
-- 
2.5.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-31  4:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-31  4:02 [PATCH 0/1] classes/npm: use npm install to do installation Paul Eggleton
2016-10-31  4:02 ` [PATCH 1/1] " Paul Eggleton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox