Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 2/6] utils/update-rust: add script to automatically update the rust version
Date: Fri, 21 Jun 2024 21:58:50 +0200	[thread overview]
Message-ID: <ZnXbepvruXKajEcz@landeda> (raw)
In-Reply-To: <CADvTj4r+O-RTMRMTSWmhW-Tb1UThcjsRM0mA1=H0DsNM3cGuTg@mail.gmail.com>

James, All,

On 2024-06-20 12:13 -0600, James Hilliard spake thusly:
[--SNIP--]
> I don't think there's really any meaningful advantage to requests vs
> urllib.request.urlopen which is part of the standard library for this
> particular use case.

requests.get() is shorter! ;-)

So, I ended up keeping use of requests. This script is not part of the
build process; it is jus ta helper script, so it is acceptable that we
depend on a non-stdlib module, especialy such a widely available one as
requests is.

> >     os.path.basename(mk_file)[:-3].upper().replace("-", "_") + "_VERSION"
> >     pathlib.Path(mk_file).name[:-3].upper().replace("-", "_") + "_VERSION"
> > One char longer... ;-)
> pathlib.Path(mk_file).stem.upper().replace("-", "_") + "_VERSION"
> Four characters shorter. ;-)

OK, you win. ;-)

I used that in the final script.

[--SNIP--]
> > Is that really important that the script can be run from anywhere? I
> > don't think so. I can however add a check that the files we want to
> > generate and tweak do already exist, though; that's a good point.
> I'm not sure, but it should be pretty easy to implement, may also
> want to use pathlib types here.

I wanted to keep the script as simple-stupid as possible. Requiring that
it be run from Buildroot's top dir is not too strong a limitation, and
adding support for running from anywhere would just add more complexity
(evenm if not too much). So, I erred on the simplicity side, and just
catches the case where a file is not found, assuming then that we're not
running from the top dir.

Thank you for the review in any case, it is always interesting to be
challenged and to explain the choices. Thanks!

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.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-06-21 19:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-14 16:21 [Buildroot] [PATCH 0/6] package: bump to python 3.12, rust 1.79.0 (branch yem/python3.12) Yann E. MORIN
2024-06-14 16:21 ` [Buildroot] [PATCH 1/6] package/sentry-cli: needs pkgconf and openssl Yann E. MORIN
2024-06-15 16:13   ` Yann E. MORIN
2024-06-14 16:21 ` [Buildroot] [PATCH 2/6] utils/update-rust: add script to automatically update the rust version Yann E. MORIN
2024-06-16 18:14   ` James Hilliard
2024-06-16 20:27     ` Yann E. MORIN
2024-06-20 18:13       ` James Hilliard
2024-06-21 19:58         ` Yann E. MORIN [this message]
2024-06-23 21:05           ` James Hilliard
2024-06-14 16:21 ` [Buildroot] [PATCH 3/6] package/rust: update to 1.79.0 Yann E. MORIN
2024-06-14 16:21 ` [Buildroot] [PATCH 4/6] package/python-web2py: fix build with python 3.12 Yann E. MORIN
2024-06-14 16:21 ` [Buildroot] [PATCH 5/6] package/python-pydantic-core: bump for fixes " Yann E. MORIN
2024-06-14 17:32   ` Yann E. MORIN
2024-06-14 18:03     ` James Hilliard
2024-06-14 20:54       ` Yann E. MORIN
2024-06-14 22:12         ` James Hilliard
2024-06-14 16:21 ` [Buildroot] [PATCH 6/6] package/python3: bump python to 3.12.4 Yann E. MORIN
2024-06-21 19:14 ` [Buildroot] [PATCH 0/6] package: bump to python 3.12, rust 1.79.0 (branch yem/python3.12) Yann E. MORIN

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=ZnXbepvruXKajEcz@landeda \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=james.hilliard1@gmail.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