[Buildroot] [PATCH 1/1] package/python3: fix config directory pattern

Vincent Fazio vfazio at gmail.com
Sun Jun 9 17:45:08 UTC 2024


Yann, all

On Sun, Jun 9, 2024 at 10:51 AM Yann E. MORIN <yann.morin.1998 at free.fr> wrote:
>
> Vincent, All,
>
> On 2024-06-08 22:25 -0500, Vincent Fazio spake thusly:
> > If a platform triplet is not detected during the configure stage, the
> > config directory (LIBPL) defaults to `config-$LDVERSION`.
>
> I found the $LDVERSION to be a bit strange, even though that is actually
> what the code uses, but here, in the contect of a Buildrot commit log,
> it does not look right, as it rather hints at the version of ld, which
> does not make sense...
>
> So I just dropped the LD to keep $VERSION, which makes mor esense I
> believe.
>
> > In this scenario, the `PYTHON3_REMOVE_USELESS_FILES` hook would fail due
> > to `find` incorrectly expecting a second dash and then the triplet.
> >
> > Now, we glob anything after the version which will match in both cases.
>
> Woot, 11MiB dropped here! 👍
>
> > Fixes: 54d48c8cad ("package/python3: miscellaneous fixups")
>
> In fact, it was already broken before that: master, which does not have
> 54d48c8cad, alrady suffered from that issue, except the error is ignore,
> as te find is in a sub-shell evaluated as the list for a for-loop.
>
> Would you care to send the same fix for master, please?
>

Sure thing: https://patchwork.ozlabs.org/project/buildroot/patch/20240609174048.31062-1-vfazio@gmail.com/


> > Signed-off-by: Vincent Fazio <vfazio at gmail.com>
>
> Applied to next, thanks.
>
> Regards,
> Yann E. MORIN.
>
> > ---
> >  package/python3/python3.mk | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/package/python3/python3.mk b/package/python3/python3.mk
> > index a0b9ed4437..a82bc47a57 100644
> > --- a/package/python3/python3.mk
> > +++ b/package/python3/python3.mk
> > @@ -204,7 +204,7 @@ PYTHON3_CONF_OPTS += \
> >  define PYTHON3_REMOVE_USELESS_FILES
> >       rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)-config
> >       rm -f $(TARGET_DIR)/usr/bin/python3-config
> > -     find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)-*/ \
> > +     find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)*/ \
> >               -type f -not -name Makefile -exec rm -rf {} \;
> >       find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/ -type d \
> >               -name __pycache__ -exec rm -rf {} \;
> > --
> > 2.34.1
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  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.  |
> '------------------------------^-------^------------------^--------------------'


More information about the buildroot mailing list