All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Stefan Herbrechtsmeier <stefan.herbrechtsmeier-oss@weidmueller.com>
Cc: Alper Nebi Yasak <alpernebiyasak@gmail.com>,
	 Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>,
	 U-Boot Mailing List <u-boot@lists.denx.de>,
	 Quentin Schulz <quentin.schulz@theobroma-systems.com>,
	Simon Glass <sjg@chromium.org>,
	Quentin Schulz <foss+uboot@0leil.net>
Subject: Re: [PATCH] binman: btool: gzip: fix packer name so that binary can be found
Date: Wed, 7 Sep 2022 05:30:08 -0700	[thread overview]
Message-ID: <CAPnjgZ3NQAOdn0ZCj15i9S7rJFYWh206cRB8_x7Hw61cUbyr1Q@mail.gmail.com> (raw)
In-Reply-To: <7635525d-c3da-6b1d-2c37-1fa67b6459a1@weidmueller.com>

Hi Quentin,

Am 01.09.2022 um 16:34 schrieb Quentin Schulz:
> Hi Stefan,
>
> On 9/1/22 08:12, Stefan Herbrechtsmeier wrote:
>> Hi Quentin,
>>
>> Am 31.08.2022 um 19:44 schrieb Simon Glass:
>>> On Wed, 31 Aug 2022 at 09:55, Quentin Schulz <foss+uboot@0leil.net>
>>> wrote:
>>>>
>>>> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>>>>
>>>> The binary is looked on the system by the suffix of the packer class.
>>>> This means binman was looking for btool_gzip on the system and not
>>>> gzip.
>>
>> Are you sure? I test it and the name is already gzip because the
>> bintool is requested as gzip. The find_bintool_class function only
>> change the class name.
>>
>
>  From current master:
> tools/binman/binman tool --list
> Name             Version      Description                Path
> ---------------  -----------  -------------------------
> ------------------------------
> btool_gzip       -            btool_gzip compression     (not found)
>
> With my patch:
> tools/binman/binman tool --list
> Name             Version      Description                Path
> ---------------  -----------  -------------------------
> ------------------------------
> gzip             1.11         gzip compression           /usr/bin/gzip
>
> Bintool.get_tool_list will return btool_gzip. Bintool.list_all will then
> iterate over all tools and call Bintool.create(name) for each.
>
> Bintool.create will call Bintool.find_bintool_class with btool_gzip and
> it'll return the Bintoolbtool_gzip class. Then its constructor will be
> called, with btool_gzip passed as argument, here:
> https://source.denx.de/u-boot/u-boot/-/blob/master/tools/binman/bintool.py#L111

Ok, we use different ways to test it. I use the version test and this
use a fixed gzip name as input.

> This is because Bintool.create has no knowledge of btool_gzip actually
> being gzip unlike Bintool.find_bintool_class.
>
> Another way to handle this, and without user intervention would be to
> remove btool_ prefix when listing the supported tools since
> Bintool.find_bintool_class will actually handle the case where the
> prefix is missing.

I think this is a better solution.

> It'd be something like:
Applied to u-boot-dm, thanks!

  parent reply	other threads:[~2022-09-07 12:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31 15:55 [PATCH] binman: btool: gzip: fix packer name so that binary can be found Quentin Schulz
2022-08-31 17:44 ` Simon Glass
2022-09-01  6:12   ` Stefan Herbrechtsmeier
2022-09-01 14:34     ` Quentin Schulz
2022-09-01 15:05       ` Stefan Herbrechtsmeier
2022-09-07 12:30       ` Simon Glass [this message]
2022-09-01 14:34     ` Simon Glass

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=CAPnjgZ3NQAOdn0ZCj15i9S7rJFYWh206cRB8_x7Hw61cUbyr1Q@mail.gmail.com \
    --to=sjg@chromium.org \
    --cc=alpernebiyasak@gmail.com \
    --cc=foss+uboot@0leil.net \
    --cc=quentin.schulz@theobroma-systems.com \
    --cc=stefan.herbrechtsmeier-oss@weidmueller.com \
    --cc=stefan.herbrechtsmeier@weidmueller.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.