[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#614907: nodejs/node command conflict: transitions

Jonathan Nieder wrote:

> I'd be happy to talk about work so far, transition plans,
> complications and possible ways forward in a separate message.

Ok, the hard part: how can we change a command's name so smoothly that
the user does not notice anything has happened?

For LinuxNode from the "node" package, there are not too many moving
parts.  ax25d's default configuration points to /usr/sbin/node; its
maintainer scripts would be responsible for changing that to
/usr/sbin/axnode.  The node package itself would be responsible for
updating inetd configuration to refer to /usr/sbin/axnode instead of
/usr/sbin/node.  A NEWS.Debian file would advertise the change so
people using other superservers could adjust their configuration by
hand.  That's it.

However, even those steps require the cooperation of the relevant
package maintainers.  They also require a willing volunteer to write
the patches.  I was a willing volunteer but my patience is leaving.

For Node.js, the problem is a little more complicated because users
are likely to use scripts that are not yet packaged for Debian.

However, it is still not too complicated:

 1. Hope that upstream will accept a patch that adds a nodejs
    synonym for the node command.  This way, scripts that use
    the "nodejs" command can be used on non-Debian systems, too.
    I don't think this should be a hard sell.

    There's a patch at http://bugs.debian.org/650343 which just
    needs to be tested and then forwarded.

 2. Debian-specific modification to npm to rewrite shebang lines
    on the fly to refer to /usr/bin/nodejs.  (npm is the Node.js
    analog of cpan, or in other words the usual way to get modules
    not yet packaged for Debian.)  This is tracked at

 3. Modify individual packages of node modules to rewrite their
    shebang lines, too.  Hopefully this is scriptable.

This transition plan was proposed by Jérémy Lal on debian-devel[1].

[1] https://lists.debian.org/debian-devel/2011/11/msg00797.html

Reply to: