[Pkg-javascript-devel] parallel installation
Mathias Behrle
mbehrle at debian.org
Sat Aug 19 10:32:39 UTC 2017
* Hubert Chathi: " [Pkg-javascript-devel] parallel installation" (Mon, 14 Aug
2017 14:38:34 -0400):
I appreciate very much the initiative to find a common procedure for making
different versions of JS libs available while still being compliant to policy.
The very special use case for me is tryton-sao [1], which was already in NEW but
which I had to withdraw, because it didn't (and still does not) support the
jquery version in stretch.
> 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.
I wonder why we should not also support MAJOR.MINOR as VER, if needed in
special cases. I am not that familiar with the JS world, but I think to
remember, that e.g. jquery didn't always follow properly semver and in such
cases it could be necessary to have a special MINOR available in the archive.
>
> 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.
This second option sounds most reasonable to me.
[1] https://anonscm.debian.org/cgit/tryton/tryton-sao.git/
--
Mathias Behrle
PGP/GnuPG key availabable from any keyserver, ID: 0xD6D09BE48405BBF6
AC29 7E5C 46B9 D0B6 1C71 7681 D6D0 9BE4 8405 BBF6
More information about the Pkg-javascript-devel
mailing list