From: "Antonin Godard" <antonin.godard@bootlin.com>
To: <alex.kanavin@gmail.com>, <openembedded-core@lists.openembedded.org>
Cc: "Alexander Kanavin" <alex@linutronix.de>
Subject: Re: [OE-core] [PATCH 1/2] scripts/install-buildtools: add an option to preserve downloads
Date: Thu, 13 Mar 2025 12:03:16 +0100 [thread overview]
Message-ID: <D8F36LBQA7AM.2Z50KMS4GASA2@bootlin.com> (raw)
In-Reply-To: <20250311104152.393470-1-alex.kanavin@gmail.com>
Hi Alex,
On Tue Mar 11, 2025 at 11:41 AM CET, Alexander Kanavin via lists.openembedded.org wrote:
> From: Alexander Kanavin <alex@linutronix.de>
>
> By default the script puts everything it downloads into a temporary
> directory and erases it after unpacking and installing the buildtools.
>
> This isn't great for traceability and reproducibility of builds
> (being able to see what was downloaded exactly, and being able
> to reproduce setting up a build, especially if the buildtools
> download location isn't available for whatever reason).
>
> This commit adds an option to download items into a specified directory
> and keep them there. I would particularly like to use it
> with bitbake-setup, where an optional script to install the buildtools
> would ensure the tarball remains available on local disk.
>
> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> ---
> scripts/install-buildtools | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/install-buildtools b/scripts/install-buildtools
> index 639ebb12d78..1a68aad53e7 100755
> --- a/scripts/install-buildtools
> +++ b/scripts/install-buildtools
> @@ -142,6 +142,9 @@ def main():
> default=DEFAULT_INSTALL_DIR,
> help='directory where buildtools SDK will be installed (optional)',
> action='store')
> + parser.add_argument('--keep-downloads-directory',
> + help='use this directory for tarball/checksum downloads and do not erase them (default is a temporary directory which is deleted after unpacking and installing the buildtools)',
> + action='store')
> parser.add_argument('-r', '--release',
> default=DEFAULT_RELEASE,
> help='Yocto Project release string for SDK which will be '
> @@ -235,11 +238,11 @@ def main():
> safe_filename = quote(filename)
> buildtools_url = "%s/%s/buildtools/%s" % (base_url, args.release, safe_filename)
>
> - tmpsdk_dir = tempfile.mkdtemp()
> + sdk_dir = args.keep_downloads_directory or tempfile.mkdtemp()
How about also creating the directory if args.keep_downloads_directory is set?
Antonin
--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-03-13 11:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 10:41 [PATCH 1/2] scripts/install-buildtools: add an option to preserve downloads Alexander Kanavin
2025-03-11 10:41 ` [PATCH 2/2] scripts/install-buildtools: write download URLs to files for traceability Alexander Kanavin
2025-03-13 11:17 ` [OE-core] " Richard Purdie
2025-03-11 10:46 ` Patchtest results for [PATCH 1/2] scripts/install-buildtools: add an option to preserve downloads patchtest
2025-03-13 11:03 ` Antonin Godard [this message]
2025-03-13 11:15 ` [OE-core] " Richard Purdie
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=D8F36LBQA7AM.2Z50KMS4GASA2@bootlin.com \
--to=antonin.godard@bootlin.com \
--cc=alex.kanavin@gmail.com \
--cc=alex@linutronix.de \
--cc=openembedded-core@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