openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Kanavin <alex.kanavin@gmail.com>
To: joseph.mills@cnhind.com
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 1/1] [mesa] Update do_install as needed per upstream changes
Date: Tue, 23 Apr 2024 09:14:16 +0200	[thread overview]
Message-ID: <CANNYZj__rD=2aVQ2US1ymon7z5p+ruDEbKaH-X44Mo5=uSyxEA@mail.gmail.com> (raw)
In-Reply-To: <20240422143921.3187890-2-joseph.mills@cnhind.com>

On Mon, 22 Apr 2024 at 16:50, Joseph Mills via lists.openembedded.org
<joseph.mills=cnhind.com@lists.openembedded.org> wrote:
>
> Signed-off-by: Joseph Mills <joseph.mills@cnhind.com>
>
> Developer's Certificate of Origin 1.1
...

Please remove the text of the DCO from the commit message, it is
entirely unnecessary.

Commit title should be 'mesa: correct sed expression in do_install to
match upstream changes'.

>  #because we cannot rely on the fact that all apps will use pkgconfig,
> -#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
> +#make eglplatform.h independent of USE_X11
>  do_install:append() {
>    # sed can't find EGL/eglplatform.h as it doesn't get installed when glvnd enabled.
>    # So, check if EGL/eglplatform.h exists before running sed.
>    if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)} && [ -f ${D}${includedir}/EGL/eglplatform.h ]; then
> -      sed -i -e 's/^#elif defined(__unix__) && defined(EGL_NO_X11)$/#elif defined(__unix__) \&\& defined(EGL_NO_X11) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
> +      sed -i -e 's/^#elif defined(USE_X11)$/#elif ${@bb.utils.contains('PACKAGECONFIG', 'x11', '1', '0', d)}/' ${D}${includedir}/EGL/eglplatform.h

Is there a way to make this into a proper source code patch that can
be applied in a way that would fail when upstream changes the code?
Sed expressions are notoriously unreliable, and this can well again
quietly regress.

What is this patching really needed for, and why do we need to do it
after the fact? Is there some issue that needs to be resolved
upstream? I'm honestly tempted to drop this rather horrible snippet
altogether, and force people to resolve it properly.

Alex


  parent reply	other threads:[~2024-04-23  7:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 14:39 [PATCH 0/1] Mesa fix for do_install when DISTRO has no x11 but has opengl Joseph Mills
2024-04-22 14:39 ` [PATCH 1/1] [mesa] Update do_install as needed per upstream changes Joseph Mills
2024-04-22 15:05   ` Patchtest results for " patchtest
2024-04-23  7:14   ` Alexander Kanavin [this message]
2024-04-25  8:24   ` [OE-core] " Alexandre Belloni

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='CANNYZj__rD=2aVQ2US1ymon7z5p+ruDEbKaH-X44Mo5=uSyxEA@mail.gmail.com' \
    --to=alex.kanavin@gmail.com \
    --cc=joseph.mills@cnhind.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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;
as well as URLs for NNTP newsgroup(s).