From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Alex Kiernan <alex.kiernan@gmail.com>,
bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel][PATCH] fetch2/crate: Unpack into CARGO_VENDORING_DIRECTORY
Date: Sun, 31 Dec 2023 10:55:37 +0000 [thread overview]
Message-ID: <367694c117d8ee8e0f253d592bd36122e0b4e47d.camel@linuxfoundation.org> (raw)
In-Reply-To: <20231230154843.8086-1-alex.kiernan@gmail.com>
On Sat, 2023-12-30 at 15:48 +0000, Alex Kiernan wrote:
> The vendor directory is set in cargo_common, to work with rust 1.75.0 we
> need to change the location, so use CARGO_VENDORING_DIRECTORY here.
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
> ---
> Is this change allowed, or am I coupling repos in a bad way and should
> hardcode `registry/src` (which is what I need it to be) here instead?
>
> bitbake/lib/bb/fetch2/crate.py | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/bitbake/lib/bb/fetch2/crate.py b/bitbake/lib/bb/fetch2/crate.py
> index 01d49435c3e8..06963294ef35 100644
> --- a/bitbake/lib/bb/fetch2/crate.py
> +++ b/bitbake/lib/bb/fetch2/crate.py
> @@ -23,8 +23,8 @@ class Crate(Wget):
>
> """Class to fetch crates via wget"""
>
> - def _cargo_bitbake_path(self, rootdir):
> - return os.path.join(rootdir, "cargo_home", "bitbake")
> + def _cargo_bitbake_path(self, d):
> + return d.getVar('CARGO_VENDORING_DIRECTORY')
>
> def supports(self, ud, d):
> """
> @@ -103,7 +103,7 @@ class Crate(Wget):
> cmd = "tar -xz --no-same-owner -f %s" % thefile
> ud.unpack_tracer.unpack("crate-extract", rootdir)
> else:
> - cargo_bitbake = self._cargo_bitbake_path(rootdir)
> + cargo_bitbake = self._cargo_bitbake_path(d)
> ud.unpack_tracer.unpack("cargo-extract", cargo_bitbake)
>
> cmd = "tar -xz --no-same-owner -f %s -C %s" % (thefile, cargo_bitbake)
> @@ -134,7 +134,7 @@ class Crate(Wget):
> # if we have metadata to write out..
> if len(metadata) > 0:
> cratepath = os.path.splitext(os.path.basename(thefile))[0]
> - bbpath = self._cargo_bitbake_path(rootdir)
> + bbpath = self._cargo_bitbake_path(d)
> mdfile = '.cargo-checksum.json'
> mdpath = os.path.join(bbpath, cratepath, mdfile)
> with open(mdpath, "w") as f:
FWIW this also breaks bitbake-selftest:
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/6261/steps/11/logs/stdio
Cheers,
Richard
prev parent reply other threads:[~2023-12-31 10:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-30 15:48 [bitbake-devel][PATCH] fetch2/crate: Unpack into CARGO_VENDORING_DIRECTORY Alex Kiernan
2023-12-30 23:50 ` Richard Purdie
2023-12-31 9:40 ` Alex Kiernan
2023-12-31 10:55 ` Richard Purdie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=367694c117d8ee8e0f253d592bd36122e0b4e47d.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=alex.kiernan@gmail.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).