What is the problem of having name there? 

The bitbake fetcher (master) handles that. 

Le mer. 5 avr. 2023, 14:25, akuster <akuster@mvista.com> a écrit :


On 4/5/23 1:20 AM, Frédéric Martinsons wrote:
> I looked at the suricata recipe in meta-security and it didn't use
> cargo-update-recipes.bbclass
>
> You should modify your rust recipes to use this class and have access
> to "bitbake -c update_crates" .
>
> You can take some examples from , i.e python3-cryptography in
> openembedded-core or python3-pyruvate
> in meta-python.
>
> The first issue you'll encounter is some kind of bootstrapping (since
> update_crates needs to fetch
> to be able to write checksum but the fetcher needs the checksum ...).
> With this error , you'll
> see all the data you need to add to the suricata-crates.inc.
>
> For curiosity, I tested locally the modification of suricata and it
> seems that this package embeds
> unexpected Cargo.lock format (in
> rust/vendor/alloc-no-stdlib/Cargo.lock) which doesn't contain
> a source entry (the package doesn't have any dependency).

I deleted the Cargo.* in the offending crates ( I found another) and I
was able to finish running the update_creates. I notice "name" is now
part of the crates URI and the SRC_URI hashes. It wont build now but I
think I can work around that.

- armin
>
> I don't know how to handle such a file (simply ignore it in the class
> instead of raising an error ?)
>
>
> On Tue, 4 Apr 2023 at 23:35, Martin Jansa <martin.jansa@gmail.com> wrote:
>
>     On Tue, Apr 4, 2023 at 11:08 PM akuster <akuster@mvista.com> wrote:
>
>
>
>         On 4/4/23 1:07 PM, Martin Jansa wrote:
>         > On Tue, Apr 4, 2023 at 6:50 PM akuster <akuster@mvista.com>
>         wrote:
>         >
>         >
>         >
>         >     On 4/1/23 11:21 AM, Frederic Martinsons wrote:
>         >     > From: Frederic Martinsons <frederic.martinsons@gmail.com>
>         >     >
>         >     > Instead of only display the first and stop.
>         >     > For recipe (crago based) that can contains several
>         artifacts
>         >     > to fetch with their checksum, it will particularly handy
>         >     > to display all of missing one.
>         >     >
>         >     > An example of error message would be
>         >
>         >     I am confused. Is this patch supposed to add the pkg
>         version or
>         >     not?  I
>         >     am not seeing any. Any ideas?
>         >
>         >
>         > name parameter with pkg version was added to bbclass in:
>         >
>         https://git.openembedded.org/openembedded-core/commit/?id=1795e98a04ad09b011afcc7cc3bf6dc49475b19a
>         >
>         > this change only allows all missing/incorrect checksums to
>         be showsn
>         > at the same time, instead of one checksum per do_fetch failure.
>
>         I get multiple hashes for the same package.
>
>         SRC_URI[wasi.sha256sum] =
>         "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
>         SRC_URI[wasi.sha256sum] =
>         "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
>
>         so why no version info after the pkg name?
>
>
>     Did you regenerate the SRC_URIs with updated bbclass? It works for
>     me as in:
>     https://github.com/shr-project/meta-webosose/commit/84dc9f3cc3dd85facde07ccddce0b9f2bcd90d39
>