From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Andre McCurdy <armccurdy@gmail.com>, Tim Orling <ticotimo@gmail.com>
Cc: OE Core mailing list <openembedded-core@lists.openembedded.org>,
Tim Orling <timothy.t.orling@linux.intel.com>
Subject: Re: [OE-core] [PATCH 1/4] scripts/install-buildtools: improvements
Date: Wed, 01 Apr 2020 23:16:41 +0100 [thread overview]
Message-ID: <9bd493e6c0a4117b04e636bc0f3200e84ab30cbd.camel@linuxfoundation.org> (raw)
In-Reply-To: <CAJ86T=WwkHPTyi4K7jg0=XOV4OgSGAjN8NcYhQ8JvUY5JY7jxw@mail.gmail.com>
On Wed, 2020-04-01 at 15:09 -0700, Andre McCurdy wrote:
> On Wed, Apr 1, 2020 at 3:02 PM Tim Orling <ticotimo@gmail.com> wrote:
> > On Wed, Apr 1, 2020 at 2:32 PM Tim Orling via
> > lists.openembedded.org <ticotimo=gmail.com@lists.openembedded.org>
> > wrote:
> > > On Wed, Apr 1, 2020 at 1:09 PM Andre McCurdy <armccurdy@gmail.com
> > > > wrote:
> > > > It looks like there are some assumptions about the minimum
> > > > version of
> > > > python3 on the host in order to even be able to run
> > > > install-buildtools. Should that be checked explicitly?
> > >
> > > To be honest, everything was written on CentOS-7, where ‘python3’
> > > is now python36.
> > >
> > > The remaining supported holdout for 3.4 is Debian-8 (Jessie).
> > > Which also happens to have tar 1.27. At least it has git 2.1.4,
> > > so it’s not a complete mess.
> > >
> > > Python 3.4 is already EOL. We should not support it for the
> > > complete build system, but I can see that the install-buildtools
> > > script should ideally still run on python34. The whole point is
> > > to make it easier to install the pre-built buildtools.
> >
> > Python 3.5 is now required in bitbake/lib/bb/__init__.py
> > Which is needed for bb.utils.md5sum_file and sha256_file to check
> > the checksum of the download. I’d rather not have to rewrite those
> > functions.
>
> Looks like copy and pasting ~30 lines? Maybe not even much of a net
> increase in code size if you can remove the existing code to check
> that bitbake libs are available...
>
> def _hasher(method, filename):
> import mmap
>
> with open(filename, "rb") as f:
> try:
> with mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) as
> mm:
> for chunk in iter(lambda: mm.read(8192), b''):
> method.update(chunk)
> except ValueError:
> # You can't mmap() an empty file so silence this
> exception
> pass
> return method.hexdigest()
>
> def md5_file(filename):
> """
> Return the hex string representation of the MD5 checksum of
> filename.
> """
> import hashlib
> return _hasher(hashlib.md5(), filename)
>
> def sha256_file(filename):
> """
> Return the hex string representation of the 256-bit SHA checksum
> of
> filename.
> """
> import hashlib
> return _hasher(hashlib.sha256(), filename)
Can you send a patch against master-next please? The buildtools
installer is one place we probably do want to support older pythons and
it shouldn't be too onnerous.
Cheers,
Richard
next prev parent reply other threads:[~2020-04-01 22:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-30 19:42 [PATCH 1/4] scripts/install-buildtools: improvements Tim Orling
2020-03-30 19:43 ` [PATCH 2/4] oe-buildenv-internal: python 3.5 as min version Tim Orling
2020-03-30 19:43 ` [PATCH 3/4] sanity.bbclass: recommend using install-buildtools Tim Orling
2020-03-30 19:52 ` [OE-core] " Andre McCurdy
2020-03-30 19:43 ` [PATCH 4/4] sanity.bbclass: add test for gcc < 5.0 Tim Orling
2020-03-30 19:52 ` [OE-core] " Richard Purdie
2020-04-01 20:09 ` [OE-core] [PATCH 1/4] scripts/install-buildtools: improvements Andre McCurdy
2020-04-01 21:31 ` Tim Orling
[not found] ` <1601CF873C42565A.6346@lists.openembedded.org>
2020-04-01 22:02 ` Tim Orling
2020-04-01 22:09 ` Andre McCurdy
2020-04-01 22:16 ` Richard Purdie [this message]
2020-04-03 23:22 ` Tim Orling
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=9bd493e6c0a4117b04e636bc0f3200e84ab30cbd.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=armccurdy@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ticotimo@gmail.com \
--cc=timothy.t.orling@linux.intel.com \
/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