Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915112 - net-libs/nodejs: USE=corepack should not require USE=-npm
Summary: net-libs/nodejs: USE=corepack should not require USE=-npm
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-03 13:39 UTC by Gianni Ceccarelli
Modified: 2023-10-17 16:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gianni Ceccarelli 2023-10-03 13:39:34 UTC
currently, it's not possible to build nodejs with both `npm` and `corepack` enabled

I'm not clear on why this was chosen, but:

* it's not necessary, I've just now built a nodejs with both enabled by just removing `corepack? ( !npm )` from `REQUIRED_USE` in the ebuild, and everything works fine
* pre-build node distributions, like those installed by `nvm`, include both `npm` and `corepack`
* some packages (I've noticed with https://www.npmjs.com/package/re2 but I suspect most packages depending on node-gyp) require `npm`, or they won't build

would it be possible to allow both USE flags at the same time?

Reproducible: Always

Steps to Reproduce:
USE='corepack npm' emerge nodejs

Actual Results:  
!!! The ebuild selected to satisfy "nodejs" has unmet requirements.
- net-libs/nodejs-20.5.1::gentoo USE="corepack doc icu inspector npm snapshot ssl system-icu system-ssl -debug (-lto) -pax-kernel -test" ABI_X86="(64)" CPU_FLAGS_X86="sse2"

  The following REQUIRED_USE flag constraints are unsatisfied:
    corepack? ( !npm )

  The above constraints are a subset of the following complete expression:
    corepack? ( !npm ) inspector? ( icu ssl ) npm? ( ssl ) system-icu? ( icu ) system-ssl? ( ssl ) x86? ( cpu_flags_x86_sse2 )



Expected Results:  
builds and installs node, and we get `/usr/bin/npm`, `/usr/bin/pnpm`, and `/usr/bin/yarn`
Comment 1 Larry the Git Cow gentoo-dev 2023-10-17 16:48:04 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c29ea5f165cdeb9ea62f7e64e9e638f5d1100cf3

commit c29ea5f165cdeb9ea62f7e64e9e638f5d1100cf3
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2023-10-17 16:47:48 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2023-10-17 16:47:58 +0000

    net-libs/nodejs: add 20.8.1
    
    Closes: https://bugs.gentoo.org/915112
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 net-libs/nodejs/Manifest             |   1 +
 net-libs/nodejs/nodejs-20.8.1.ebuild | 261 +++++++++++++++++++++++++++++++++++
 2 files changed, 262 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d05b364e7b5e96f7da6c5ed15634d612b88da477

commit d05b364e7b5e96f7da6c5ed15634d612b88da477
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2023-10-17 16:47:37 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2023-10-17 16:47:57 +0000

    net-libs/nodejs: add 18.18.2
    
    Closes: https://bugs.gentoo.org/915112
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 net-libs/nodejs/Manifest              |   1 +
 net-libs/nodejs/nodejs-18.18.2.ebuild | 257 ++++++++++++++++++++++++++++++++++
 2 files changed, 258 insertions(+)