All of lore.kernel.org
 help / color / mirror / Atom feed
* Fix some NPM related problems
@ 2022-05-13 13:48 Zoltan Boszormenyi
  2022-05-13 13:48 ` [PATCH 1/2] npm.bbclass: Fix file permissions before opening it for writing Zoltan Boszormenyi
  2022-05-13 13:48 ` [PATCH 2/2] staging.bbclass: Ignore installing multiple symlinks of the same name Zoltan Boszormenyi
  0 siblings, 2 replies; 8+ messages in thread
From: Zoltan Boszormenyi @ 2022-05-13 13:48 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jean-Marie LEMETAYER


When trying to create recipes for Angular so that "ng build"
can be run, I ran into some problems. Two of them I was able fix.

The first two problems are in the same class and boil down to
the fact that some node module archives are created by an idiotic
tar client (probably on Windows) and contain wrong permissions.

Problem 1) Directories have no "x" permission bit

This cannot be worked around as tar creates the directory as is
but creating the first file in the directory will fail.

tar exits with an error and there is no option for it to
override directory permissions.

license-webpack-plugin 2.3.1, a dependency for Angular 11 is
such a contender.

Problem 2) package.json have no "w" permission bit

This can be worked around with
[PATCH 1/2] npm.bbclass: Fix file permissions before opening it for writing

Problem 3) Recipes with "inherit npm" install the /usr/lib/node symlink

I needed to create a complete set of Angular recipes where "ng build"
can run. But when trying to use them in DEPENDS for an Angular based
project, this error kicked in from staging.bbclass:

bb.fatal("The file %s is installed by both %s and %s, aborting" % (dest, c, fileset[hashname]))

This is fixed by ignoring the sole /usr/lib/node symlink in staging.bbclass
when checking for identical files with

[PATCH 2/2] staging.bbclass: Ignore installing multiple symlinks of the same name

I discovered this issue in Yocto 3.3.

I cc-ed relevant parties who edited either bbclass around where
I just modified them.

Best regards,
Zoltán Böszörményi


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-05-13 14:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-13 13:48 Fix some NPM related problems Zoltan Boszormenyi
2022-05-13 13:48 ` [PATCH 1/2] npm.bbclass: Fix file permissions before opening it for writing Zoltan Boszormenyi
2022-05-13 13:52   ` [OE-core] " Alexander Kanavin
     [not found]     ` <b47fd784-6d1d-4c89-a61a-d517210ac41a@gmail.com>
2022-05-13 14:00       ` Alexander Kanavin
2022-05-13 13:48 ` [PATCH 2/2] staging.bbclass: Ignore installing multiple symlinks of the same name Zoltan Boszormenyi
2022-05-13 13:55   ` [OE-core] " Alexander Kanavin
2022-05-13 14:02     ` Zoltan Boszormenyi
2022-05-13 14:14       ` richard.purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.