On 03/11/2016 03:33 AM, Tom Hughes wrote: > On 10/03/16 16:20, Stephen Gallagher wrote: >> On 03/10/2016 06:32 AM, Stephen Gallagher wrote: >> >>>> On Mar 10, 2016, at 4:43 AM, Tom Hughes <[email protected]> wrote: >>>> >>>> - The npm doesn't work at all because all the bundled modules are in >>>> the node_modules.bundled directory and node_modules is empty - moving >>>> them fixes it >>> >>> Hmm, that's odd; it's supposed to contain symlinks to the bundled libraries. >>> That's because the old NPM package had unbundled lobs symlinked in there and >>> RPM can't replace a symlink with a directory. I'll look into it this >>> morning. >> >> Aaand I forgot that in my testing I made this an "echo" statement instead of >> real symlinks. Oddly enough, `npm install <foo>` was working for me locally. >> I >> have no idea how... > > So this is still not quite right in the latest version - the node_modules > directory now contains a symlink called "*" that > points at the bundled directory. > > What's the logic behind creating links anyway? Why not just put > the modules in node_modules directly? or is what you're doing how upstream > does it? >
This is basically due to a long-standing bug in RPM. The current separate 'npm' package has: /usr/lib/node_modules/npm/node_modules/<a bunch of symlinks to unbundled modules> We cannot upgrade to a new package that replaces a symlink-to-a-directory with a real directory. RPM can't handle that case and it throws conflict errors instead of doing the replacement. I don't know the details of why, but this has been true for many years and RPM developers say it won't be changing (probably a major architectural problem). See: https://fedoraproject.org/wiki/Packaging:Directory_Replacement So, there are two possible choices on how to deal with it: 1) Use a %pretrans scriptlet that deletes the existing links manually before the new package installs the new directory. 2) Move the new directories somewhere else and just update the links. I chose to go with 2) because the problem with 1) is that it's much more painful to try to go from a directory to a symlink, so if we ever changed our mind, it's going to be hard to switch back. Anyway, I'll look into why the symlink is still wrong. I must have typoed something. (I really wish I knew why everything still *worked* though...)
signature.asc
Description: OpenPGP digital signature
_______________________________________________ nodejs mailing list [email protected] http://lists.fedoraproject.org/admin/lists/[email protected]
