[Pkg-javascript-devel] NodeJS repository structure

Jérémy Lal jerry at edagames.com
Thu Oct 13 21:21:35 UTC 2011


On 13/10/2011 20:31, Jonas Smedegaard wrote:
> On 11-10-13 at 08:25pm, David Paleino wrote:
>> I noticed that we're putting libraries under /usr/lib/nodejs/, but 
>> there's also a /usr/share/nodejs/ populated by nodejs-dev.
>>
>> I've packaged libnode-sqlite3, which compiles a binding to 
>> libsqlite3-dev, so /u/lib/ is its perfect place. But I'm wondering why 
>> we're putting also arch-independent libraries in /u/lib/ ? Wouldn't it 
>> better to follow the commonly used scheme of /u/share for arch-indep 
>> and /u/lib for arch-dep?
>>
>> I haven't looked at nodejs code, but it doesn't seem too hard to 
>> implement, given nodejs-dev already populates that directory.
>>
>> What do you think about this?
> 
> As a principle I totally agree.
> 
> Jérémy is our Node expert, however - let's wait and hear his opinion :-)

Facts :
* arch-independent libs must go to /usr/share/nodejs
* arch-dependent libs must go to /usr/lib/nodejs
* node libs that are arch-dependent almost all have two files : a dependent .node
  and an independent .js
* it is unwise to multiply nodejs search paths...

The simple decision is to put all modules in /usr/lib/nodejs,
I understand it's more important to have arch-dependent libs in the right
place than having arch-independent libs in the right place, and all modules
stay in the same dir.
More importantly this is the same pattern as python and ruby.

I'm nonetheless open to discussion.

Jérémy.






More information about the Pkg-javascript-devel mailing list