Bug 9250 - Failing to create npm packages when modules has special characters in their names
Summary: Failing to create npm packages when modules has special characters in their n...
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 2.1
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.1 M4
Assignee: Brendan Le Foll
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-03-14 15:07 UTC by Sudarsana Nagineni
Modified: 2016-04-21 15:29 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sudarsana Nagineni 2016-03-14 15:07:30 UTC
Some of the node modules have '_' in their names (e.g. string_decoder) and causing the following failure when creating npm packages with bitbake.

| Packaged contents of coap-readable-stream-process-nextick-args into /dev/image/build/tmp-glibc/work/corei7-64-ostro-linux/coap/0.14.0-r0/deploy-ipks/corei7-64/coap-readable-stream-process-nextick-args_1.0.6-r0_corei7-64.ipk

| coap-readable-stream-string_decoder
| *** Error: Package name  contains illegal characters, (other than [a-z0-9.+-])

| 
| opkg-build: Please fix the above errors and try again.
| DEBUG: Python function do_package_ipk finished
| DEBUG: Python function do_package_write_ipk finished
| ERROR: Function failed: opkg-build execution failed

To reproduce the issue, try with the 'coap' module which is dependent on string_decoder - https://www.npmjs.com/package/coap
Comment 1 Jussi Kukkonen 2016-04-21 15:29:28 UTC
Seems to be fixed.


commit 69e20cade69af6b7563581a6f03e95667ab09c43
Author: Brendan Le Foll <brendan.le.foll@intel.com>
Date:   Tue Apr 12 10:58:39 2016 +0100

    npm.bbclass: Stop packagenames containing underscores from being generated
    
    Package names cannot contain underscores yet some npm modules use them as part
    of the name, replace them with hyphens in the package name.
    
    (From OE-Core rev: fea932c79c8201e3e7649f4443874ea540e33461)
    
    Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
    Signed-off-by: Ross Burton <ross.burton@intel.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>