<div dir="ltr"><div><div><div>Khem , Thank you very much !<br><br><span id="result_box" class="" lang="en"><span class=""><br></span></span></div></div>Best Regards,<br><br></div>Caio Pereira<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-15 5:57 GMT-03:00 Khem Raj <span dir="ltr"><<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sat, Mar 14, 2015 at 11:35 AM, Caio <<a href="mailto:caiortp@gmail.com">caiortp@gmail.com</a>> wrote:<br>
> Hi folks!<br>
><br>
> I'm writing a recipe to build the nodejs with node-serialport, but i'm<br>
> having problem in the QA and in the do_package.<br>
><br>
> This problem occurs when I try to copy all the npm packets to target path<br>
> using the command "cp -r".<br>
><br>
>   cp -r ${S}/build/* ${D}${libdir}/node_modules/serialport/build/<br>
>   cp -r ${S}/node_modules/* ${D}${libdir}/node_modules<br>
><br>
> When I use the cp , the bitbake display the following message:<br>
><br>
> WARNING: QA Issue: node-serialport requires /bin/bash, /bin/zsh, but no<br>
> providers in its RDEPENDS [file-rdeps]<br>
><br>
> I try to add RDEPENDS += "bash" but this is not enough, and the bitbake ask<br>
> for the /bin/zsh and the zsh is blacklisted.<br>
><br>
> *I'm not a "Yocto expert" so I need improve my recipes (there's some<br>
> workarounds in my recipes)<br>
<br>
</span>These errors can be easily avoided by making more granular packaging.<br>
Identify the scripts in the install tree which require bash and zsh<br>
for interpreter, then add PACKAGES += "${PN}-bash ${PN}-zsh" which<br>
defines two extra output packages. then add FILES_${PN}-zsh =<br>
"/path/to/the/zsh/scripts/" and same for for another package. Then add<br>
RDEPENDS_${PN}-zsh = "zsh" RDEPENDS_${PN}-bash = "bash"<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
><br>
> I'm using as model the Recipes from webOS :<br>
> <a href="https://github.com/openwebos/meta-webos/tree/master/recipes-upstreamable/node-gyp" target="_blank">https://github.com/openwebos/meta-webos/tree/master/recipes-upstreamable/node-gyp</a><br>
><br>
><br>
> <a href="http://node-serialport_git.bb" target="_blank">node-serialport_git.bb</a><br>
><br>
> SUMMARY = "node-serial is a Serial Port binding for Node.js"<br>
> SECTION = "nodejs/module"<br>
> LICENSE = "MIT"<br>
> LIC_FILES_CHKSUM = "file://README.md;md5=b9a59a0fefe195d10be82cf7f0a99788"<br>
><br>
> DEPENDS = "node-pre-gyp-native"<br>
><br>
> PV = "1.6.1+gitr${SRCPV}"<br>
><br>
> RDEPENDS = "bash"<br>
><br>
> SRC_URI =<br>
> "git://<a href="http://github.com/voodootikigod/node-serialport.git;branch=master;protocol=git" target="_blank">github.com/voodootikigod/node-serialport.git;branch=master;protocol=git</a>"<br>
> SRCREV = "94b7bdcc087b820e10913c483bab3e2c54d103f2"<br>
> S = "${WORKDIR}/git"<br>
><br>
><br>
> do_configure() {<br>
>Â Â Â export LD="${CXX}"<br>
>Â Â Â export GYP_DEFINES="sysroot=${STAGING_DIR_HOST}"<br>
>Â Â Â node-pre-gyp --target_arch=${TARGET_ARCH} --target_platform=linux<br>
> configure<br>
> }<br>
><br>
> do_compile() {<br>
>Â Â Â export LD="${CXX}"<br>
>Â Â Â export GYP_DEFINES="sysroot=${STAGING_DIR_HOST}"<br>
>   node-pre-gyp --target_arch=${TARGET_ARCH} --target_platform=linux build<br>
> }<br>
><br>
> do_install() {<br>
><br>
>Â Â Â npm install --no-cache<br>
>Â Â Â install -d ${D}${libdir}/node_modules<br>
>Â Â Â install -d ${D}${libdir}/node_modules/serialport/<br>
>Â Â Â install -d ${D}${libdir}/node_modules/serialport/build<br>
>Â Â Â install -d ${D}${libdir}/node_modules/serialport/bin<br>
>Â Â Â install -d ${S}/build/Release/<br>
> ${D}${libdir}/node_modules/serialport/build/<br>
>Â Â Â install -m 0664 ${S}/bin/serialportList.js<br>
> ${D}${libdir}/node_modules/serialport/bin/<br>
>Â Â Â install -m 0664 ${S}/bin/serialportTerminal.js<br>
> ${D}${libdir}/node_modules/serialport/bin/<br>
>Â Â Â install -m 0664 ${S}/package.json ${D}${libdir}/node_modules/serialport/<br>
>   install -m 0664 ${S}/parsers.js  ${D}${libdir}/node_modules/serialport/<br>
>Â Â Â install -m 0664 ${S}/serialport.js<br>
> ${D}${libdir}/node_modules/serialport/<br>
> #problematic line if the cp lines are uncommented the bitbake displayed to<br>
> add RDEPEND /bin/bash and /bin/zsh<br>
>   cp -r ${S}/build/* ${D}${libdir}/node_modules/serialport/build/<br>
>   cp -r ${S}/node_modules/* ${D}${libdir}/node_modules<br>
> }<br>
><br>
><br>
> FILES_${PN} += "${libdir}/node_modules \<br>
>Â Â Â Â Â ${libdir}/node_modules/serialport \<br>
>Â Â Â Â Â ${libdir}/node_modules/serialport/build \<br>
> "<br>
><br>
> FILES_${PN}-dbg += "${libdir}/node_modules/.debug \<br>
>Â Â Â Â Â ${libdir}/node_modules/serialport/.debug \<br>
>Â Â Â Â Â ${libdir}/node_modules/serialport/build/.debug \<br>
>Â Â Â Â Â ${libdir/node_modules/serialport/build/Release/.debug \<br>
> "<br>
> #workaround to avoid QA's problems, must be fixed in the second round<br>
> INHIBIT_PACKAGE_DEBUG_SPLIT = "1"<br>
> INHIBIT_PACKAGE_STRIP = "1"<br>
><br>
><br>
> }<br>
><br>
><br>
><br>
> <a href="http://node_pre-gyp-native.bb" target="_blank">node_pre-gyp-native.bb</a><br>
><br>
> DESCRIPTION = "Node.js tool for easy binary deployment of C++ addons"<br>
> HOMEPAGE = "<a href="https://github.com/mapbox/node-pre-gyp.git" target="_blank">https://github.com/mapbox/node-pre-gyp.git</a>"<br>
> LICENSE = "BSD"<br>
> SECTION = "nodejs/module"<br>
><br>
> LIC_FILES_CHKSUM = "file://LICENSE;md5=7e13c3cf883a44ebcc74a8f568c0f6fb"<br>
><br>
> SRC_URI =<br>
> "git://<a href="http://github.com/mapbox/node-pre-gyp.git;branch=master;protocol=git" target="_blank">github.com/mapbox/node-pre-gyp.git;branch=master;protocol=git</a>"<br>
> SRCREV = "332b8b123e3aa91718fad763cf1fc11c4cfb49b7"<br>
> DEPENDS = "nodejs-native node-gyp-native"<br>
><br>
> S = "${WORKDIR}/git"<br>
><br>
> inherit native<br>
><br>
> do_install () {<br>
>Â Â #woraround to install the node-pre-gyp<br>
>Â Â npm install -g --force<br>
> }<br>
><br>
> If someone could help me I will be grateful.<br>
> Thanks !<br>
><br>
> Regards,<br>
><br>
> --<br>
> ----------------------------------------------<br>
> Caio Pereira<br>
><br>
</div></div><span class="HOEnZb"><font color="#888888">> --<br>
> _______________________________________________<br>
> yocto mailing list<br>
> <a href="mailto:yocto@yoctoproject.org">yocto@yoctoproject.org</a><br>
> <a href="https://lists.yoctoproject.org/listinfo/yocto" target="_blank">https://lists.yoctoproject.org/listinfo/yocto</a><br>
><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">----------------------------------------------<br>Caio Pereira</div>
</div>