Message ID | 20220513153031.1032716-3-zboszor@pr.hu |
---|---|
State | New |
Headers | show |
Series | [v2,1/3] npm.bbclass: Fix file permissions before opening it for writing | expand |
2022. 05. 13. 17:42 keltezéssel, Alexander Kanavin írta: > This needs to be sent to the openembedded-devel list. Is it ok just to cc openembedded-devel? Because applying this 3rd patch to meta-oe without applying the second to oe-core will cause conflicts and has a high chance to be rejected. > > Alex > > On Fri, 13 May 2022 at 17:31, Zoltan Boszormenyi via > lists.openembedded.org <zboszor=pr.hu@lists.openembedded.org> wrote: >> >> From: Zoltán Böszörményi <zboszor@gmail.com> >> >> While /usr/lib/node_modules and all npm-related modules are >> shipped in the npm subpackage, keep the symlink in the main >> package because 3rd party modules that don't need npm are >> also installed into /usr/lib/node_modules. >> >> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> >> --- >> meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb b/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb >> index 62188f94a..be68afd4c 100644 >> --- a/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb >> +++ b/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb >> @@ -159,6 +159,10 @@ do_compile () { >> >> do_install () { >> oe_runmake install DESTDIR=${D} >> + >> + # node(1) is using /usr/lib/node as default include directory and npm(1) is >> + # using /usr/lib/node_modules as install directory. Let's make both happy. >> + ln -fs node_modules ${D}/${nonarch_libdir}/node >> } >> >> BINARIES = " \ >> @@ -176,6 +180,7 @@ do_install:append:class-native() { >> } >> >> PACKAGES =+ "${PN}-npm" >> +FILES:${PN} += "${nonarch_libdir}/node" >> FILES:${PN}-npm = "${nonarch_libdir}/node_modules ${bindir}/npm ${bindir}/npx" >> RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \ >> python3-misc python3-multiprocessing" >> -- >> 2.36.1 >> >> >> >>
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb b/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb index 62188f94a..be68afd4c 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb +++ b/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb @@ -159,6 +159,10 @@ do_compile () { do_install () { oe_runmake install DESTDIR=${D} + + # node(1) is using /usr/lib/node as default include directory and npm(1) is + # using /usr/lib/node_modules as install directory. Let's make both happy. + ln -fs node_modules ${D}/${nonarch_libdir}/node } BINARIES = " \ @@ -176,6 +180,7 @@ do_install:append:class-native() { } PACKAGES =+ "${PN}-npm" +FILES:${PN} += "${nonarch_libdir}/node" FILES:${PN}-npm = "${nonarch_libdir}/node_modules ${bindir}/npm ${bindir}/npx" RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \ python3-misc python3-multiprocessing"