Go to file
Yann E. MORIN 4a16182d5f package/nodejs: use per-build cache directories
When two Buildroot builds run in parallel, and they both happen to call
npm at roughly the same time, the two npm instances may conflict when
accessing the npm cache, which is by default ~/.npm

Although npm is supposed to lock access to the cache, it seems it does
sometimes fail to do so properly, bailling out in error, when it would
never ever crash at all when not running in parallel. We suspect that
the sequence leading to such failures are something like:

    npm-1                           npm-2
      lock(retry=few, sleep=short)    .
      does-stuff()                    .
      .                               lock(retry=few, sleep=short)
      .                               # can't lock local cache
      .                               download-module()
      .                                 # can't download
      .                                 exit(1)
      unlock()

As per the docs [0], few = 10, short = 10. So if the first npm (npm-1)
takes more than 100s (which can happen behind slow links and/or big
modules that contain native code that is compiled), then the second npm
(npm-2) will bail out (the download would fail if there is no network
access, for example, and only local modules are used).

Point npm to use a per-build cache directory, so they no longer compete
across builds.

That would still need some care when we do top-level parallel builds,
though.

Note also that the conflicts are not totally eliminated: two or more npm
instances may still compete for some other resource that has not yet
been identified.

But, at least, the conflict window has been drastically shortened now,
to the point where it now seldom occurs.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-10-15 13:21:34 +02:00
arch arch: drop BR2_GCC_TARGET_CPU_REVISION option 2018-10-01 14:52:32 +02:00
board configs/bananapi_m2_ultra: new defconfig 2018-10-14 10:10:36 +02:00
boot boot/uboot: fix environment image generation on big endian systems 2018-10-14 21:11:58 +02:00
configs configs/raspberrypi*: bump kernel version to 6d27aa156c 2018-10-15 13:15:19 +02:00
docs docs/manual: document the new get-developers -e option 2018-10-09 14:48:07 +02:00
fs fs/btrfs: remove destination file before generation 2018-08-25 23:59:23 +02:00
linux linux-headers: bump 4.{4, 9, 14, 18}.x series 2018-09-26 19:50:59 +02:00
package package/nodejs: use per-build cache directories 2018-10-15 13:21:34 +02:00
support support/testing: fix TestATFMarvell test case 2018-10-14 19:38:32 +02:00
system system: update Config.in comment about systemd dependencies 2018-09-15 00:05:48 +02:00
toolchain pkg-toolchain-external.mk: fix s/CC_TARGET_ARCH/GCC_TARGET_ARCH/ typo 2018-10-01 17:33:59 +02:00
utils utils/get-developers: fix python 3.x compatibility 2018-10-12 09:05:50 +02:00
.defconfig arch: remove support for sh64 2016-09-08 22:15:15 +02:00
.flake8 .flake8: ignore utils/diffconfig 2018-03-13 22:37:54 +01:00
.gitignore update gitignore 2013-05-04 12:41:55 +02:00
.gitlab-ci.yml configs/bananapi_m2_ultra: new defconfig 2018-10-14 10:10:36 +02:00
.gitlab-ci.yml.in Makefile: introduce check-package target 2018-08-12 14:39:32 +02:00
CHANGES Update for 2018.08.1 2018-10-07 11:44:17 +02:00
Config.in Config.in: add BR2_HOST_GCC_AT_LEAST_8 2018-05-02 14:50:14 +02:00
Config.in.legacy package/linux-headers: really drop the 4.17 choice 2018-10-07 21:45:16 +02:00
COPYING COPYING: add exception about patch licensing 2016-02-26 19:50:13 +01:00
DEVELOPERS python-pycryptodomex: new package 2018-10-10 14:26:38 +02:00
Makefile arch: add support for RISC-V 64-bit (riscv64) architecture 2018-09-23 23:42:41 +02:00
Makefile.legacy Remove BR2_DEPRECATED 2016-10-15 23:14:45 +02:00
README README: add reference to submitting-patches 2016-02-01 19:16:08 +01:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches