[macports-ports] 07/07: npm: use an older nodejs on < 10.7

Mojca Miklavec mojca at macports.org
Mon Jan 30 12:16:45 UTC 2017


On 30 January 2017 at 11:27, Ryan Schmidt wrote:
>> On Jan 26, 2017, at 17:17, Mojca Miklavec wrote:
>>
>> https://github.com/macports/macports-ports/commit/19b2d7444aee50a1a155c2f571b4123301ba16c4
>>
>> --- a/devel/npm4/Portfile
>> +++ b/devel/npm4/Portfile
>>
>>  depends_lib         path:bin/node:nodejs6
>>
>> +platform darwin {
>> +    if {${os.major} < 11} {
>> +        depends_lib-replace bin:node:nodejs6 bin:node:nodejs4
>> +    }
>> +}
>
> This doesn't do anything. The port doesn't have a "bin:node:nodejs6" dependency to replace, nor should it, because that would allow non-MacPorts "node" binaries to satisfy the dependency, which we don't want. The port has a "path:bin/node:nodejs6" dependency, so the line needs to read "depends_lib-replace path:bin/node:nodejs6 path:bin/node:nodejs4".

Thanks a lot for spotting this. (Maintainer of npm never reviewed the
changes and I wasn't careful enough.)

> I assume you copied this block from yarn, which does have a "bin:node:nodejs6" dependency.

Indeed.

> I would replace that with a "path:bin/node:nodejs6" dependency

I agree.

> unless there's something special about yarn that I'm not aware of.

I don't think there's anything special. The port has been introduced recently
    https://github.com/macports/macports-ports/pull/48
and I guess that nobody noticed the dependency was specified in a
slightly wrong way.

I'm CC-ing maintainers of yarn, but I committed the fixes for all
three ports (npm3, npm4, yarn). I wasn't sure if a revbump was needed
for yarn, so I didn't do it (the only affected users would probably be
those with nodejs in bin).

Mojca


More information about the macports-dev mailing list