Hi,

On 14-08-17 20:38, Hubert Chathi wrote:
> At the BoF at DebConf, we were talking about parallel installation of
> different versions of JS libraries.  In order to do parallel
> installation, we'd need differently named packages for different
> versions, and it seems like the obvious way to do that is to have
> packages called something like libjs-fooVER and node-fooVER, where VER
> some sort of the API version, similar to the way that C/C++ library
> packages are named after the library SONAME.  If upstream follows semver
> properly, then VER would be the major version number.

This sounds like a reasonable approach, but what I am missing is a
recommendation on what to do to keep the number of packages limited. I
think it is not such a great idea to replace one problem (not the right
version) with another one (too many packages to support).

One approach could be for example the following. Try to have only two
versions per release, but really limit the number to a maximum of 3.

> For libjs-fooVER, the JavaScript files would probably go in
> /usr/share/javascript/fooVER/ rather than /usr/share/javascript/foo.
> Obviously everything that previously pointed to the old place would have
> to now point to the new place, but we could create a libjs-foo
> transitional package libjs-foo that symlinks /usr/share/javascript/foo
> to /usr/share/javascript/fooVER so that existing packages don't break.
> 
> For node-fooVER, the logical analogue would be to put the files in
> /usr/lib/nodejs/fooVER.  However, anything that uses the library does
> "require("foo")", and so would not be able to find it there.  There are
> a couple possible options for fixing that I can think of.  The first is
> to change all "require("foo")" to "require("fooVER")", but that sounds
> painful to do.  The second option is to add a symlink from
> node_modules/foo to /usr/lib/nodejs/fooVER in the root directory of the
> thing that requires foo.  I think the second option is the best,
> especially since Node upstream seems to prefer searching for things in
> node_modules rather than in /usr/lib/nodejs.  And again, we may want to
> create a transitional package node-foo that symlinks /usr/lib/nodejs/foo
> to /usr/lib/nodejs/fooVER.
> 
> What are peoples' thoughts on this?

For packages that are somewhat forgiving and/or want to migrate when
required, it may make sense to not think about the *-foo packages as
transitional packages, but as the default, which will always point to
the latest version. Honestly, I rather depend on such a package and fix
bugs as they come than having to keep an eye out for updates and update
the dependency to the latest version.

Paul

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to