Bug#614907: nodejs/node command conflict: transitions
- To: email@example.com
- Subject: Bug#614907: nodejs/node command conflict: transitions
- From: Jonathan Nieder <firstname.lastname@example.org>
- Date: Wed, 2 May 2012 18:33:42 -0500
- Message-id: <20120502233342.GD32660@burratino>
- Mail-followup-to: email@example.com
- In-reply-to: <20120502205554.GA32001@burratino>
- References: <20110224084728.GA13381@elie> <20120502205554.GA32001@burratino>
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.