[Buildroot] [PATCH next 2/2] package/pkg-cargo: move CARGO_HOME into DL_DIR

Yann E. MORIN yann.morin.1998 at free.fr
Sat Jan 14 14:19:12 UTC 2023


Thomas, All,

On 2023-01-14 14:58 +0100, Yann E. MORIN spake thusly:
> On 2022-11-03 23:45 +0100, Thomas Petazzoni via buildroot spake thusly:
> > CARGO_HOME is where Cargo stores its downloaded artefacts. See
> > https://doc.rust-lang.org/cargo/reference/environment-variables.html:
[--SNIP--]
> > To solve this, this commit moves CARGO_HOME into $(DL_DIR), so that it
> > is shared between builds and packages.
> Unfortunately, this causes breakage when there are parallel downloads
> (see below for except; full log as attachment).
> So, there are two solutions:
>  1. revert to a per-package cargo home, losing the benefit of a shared
>     cache, but trivial to implement
>  2. add locking ourselves in the post-process scripts, so that there are
>     never two "cargo vendor" running in parallel, which is slightly more
>     involved.

In fact, it turns out that doing the lock ourselves is relatively
trivial, so I'll do a few more tests and send a patch...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list