From: Uladzimir Bely <ubely@ilbers.de>
To: srinuvasan.a@siemens.com, isar-users@googlegroups.com
Subject: Re: [PATCH] meta/recipes-devtools/sbuild-chroot: Use modern python formatting
Date: Tue, 21 Jan 2025 16:58:08 +0300 [thread overview]
Message-ID: <6fb5224df1bdbbd8f11f372dc032347c91c8ac49.camel@ilbers.de> (raw)
In-Reply-To: <20250114110019.189529-1-srinuvasan.a@siemens.com>
On Tue, 2025-01-14 at 16:30 +0530, srinuvasan.a@siemens.com wrote:
> From: srinuvasan <srinuvasan.a@siemens.com>
>
> f-strings are faster and better than str.format(), and Moreover
> f-strings provide a concise and convenient way to embed Python
> expressions
> inside string literals for formatting, hence use f-strings rather
> than str.format().
>
> Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
> ---
> .../recipes-devtools/sbuild-chroot/sbuild-chroot.inc | 12 ++++++----
> --
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
> b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
> index d794c6fd..6478d3a6 100644
> --- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
> +++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
> @@ -23,21 +23,21 @@ python() {
>
> if d.getVar('DISTRO_GCC'):
> d.appendVar('SBUILD_CHROOT_PREINSTALL_COMMON',
> - ' libgcc-{}-dev:{}'.format(distro_gcc,
> distro_arch))
> + f" libgcc-{distro_gcc}-dev:{distro_arch}")
> d.appendVar('SBUILD_CHROOT_PREINSTALL_COMMON',
> - ' libstdc++-{}-dev:{}'.format(distro_gcc,
> distro_arch))
> + f" libstdc++-{distro_gcc}-dev:{distro_arch}")
>
> if bb.utils.to_boolean(d.getVar('ISAR_ENABLE_COMPAT_ARCH')):
> compat_arch = d.getVar('COMPAT_DISTRO_ARCH')
> d.appendVar('SBUILD_CHROOT_COMPAT_PREINSTALL',
> - ' libc6-dev:{}'.format(compat_arch))
> + f" libc6-dev:{compat_arch}")
> d.appendVar('SBUILD_CHROOT_COMPAT_PREINSTALL',
> - ' crossbuild-essential-{}'.format(compat_arch))
> + f" crossbuild-essential-{compat_arch}")
> if d.getVar('DISTRO_GCC'):
> d.appendVar('SBUILD_CHROOT_COMPAT_PREINSTALL',
> - ' libgcc-{}-dev:{}'.format(distro_gcc,
> compat_arch))
> + f" libgcc-{distro_gcc}-dev:{compat_arch}")
> d.appendVar('SBUILD_CHROOT_COMPAT_PREINSTALL',
> - ' libstdc++-{}-dev:{}'.format(distro_gcc,
> compat_arch))
> + f" libstdc++-{distro_gcc}-
> dev:{compat_arch}")
> }
>
> SBUILD_CHROOT_PREINSTALL_COMMON = " \
Applied to next, thanks.
--
Best regards,
Uladzimir.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/6fb5224df1bdbbd8f11f372dc032347c91c8ac49.camel%40ilbers.de.
prev parent reply other threads:[~2025-01-21 13:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 11:00 srinuvasan.a via isar-users
2025-01-21 13:58 ` Uladzimir Bely [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=6fb5224df1bdbbd8f11f372dc032347c91c8ac49.camel@ilbers.de \
--to=ubely@ilbers.de \
--cc=isar-users@googlegroups.com \
--cc=srinuvasan.a@siemens.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