All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin Jansa" <Martin.Jansa@gmail.com>
To: Anibal Limon <anibal.limon@linaro.org>
Cc: OE-core <openembedded-core@lists.openembedded.org>,
	 Richard Purdie <richard.purdie@linuxfoundation.org>,
	 Nicolas Dechesne <nicolas.dechesne@linaro.org>
Subject: Re: [OE-core] [PATCH] glib-2.0: replace THISDIR instead of COREBASE in find_meson_cross_files --cross-file paths
Date: Tue, 2 Mar 2021 18:32:22 +0100	[thread overview]
Message-ID: <CA+chaQevEWE=RaqQzXfGOaQVCSw1Jf814EQF+-Cdx4X46xO1Fg@mail.gmail.com> (raw)
In-Reply-To: <CA+_AqitMGVbVikHDF2bnimSsXSmM0tfeXBCgYjgeSpFYL2FGOA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3436 bytes --]

what's the value of COREBASE in that build? Wasn't full path already in
your sstate signatures - in that case this change didn't break your builds,
just highlighted an issue in your builds which was already there.

We can fix that by calling os.path.normpath on THISDIR, but I would like to
know the reason why THISDIR is set this way for you (also to reproduce it
locally to verify the fix).




On Tue, Mar 2, 2021 at 6:14 PM Anibal Limon <anibal.limon@linaro.org> wrote:

> This breaks our builds,
>
> ...
> ERROR: Cannot add
> '/home/builds/oe-rpb-master/layers/openembedded-core/meta/recipes-core/glib-2.0/files/meson.cross.d/common'
> to --cross-file, because it's not relative to THISDIR
> '/home/builds/oe-rpb-master/build-410c-2/conf/../../layers/openembedded-core/meta/recipes-core/glib-2.0'
> and sstate signature would contain this full path
> ...
>
> In,
>
>
> https://ci.linaro.org/job/lt-qcom-openembedded-rpb-master/DISTRO=rpb,MACHINE=dragonboard-410c,label=docker-buster-amd64/470/console
>
> Regards,
> Anibal
>
> On Thu, 25 Feb 2021 at 11:45, Martin Jansa <Martin.Jansa@gmail.com> wrote:
>
>> * COREBASE works correctly only as long as this recipe is inside of
>>   COREBASE directory and leaves the full absolute paths if you copy
>>   this recipe into your own layer (e.g. to backport newer version)
>>
>> * use THISDIR as all FILESPATH should be relative to that, unless
>>   there is a .bbappend not only extending FILESPATH, but also adding
>>   meson.cross.d files there (at which point it also didn't work with
>>   COREBASE replacements as well already) - show an ERROR in such case,
>>   I don't think it's common scenario to spend more time to support that.
>>
>> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
>> ---
>>  meta/recipes-core/glib-2.0/glib-2.0_2.66.7.bb | 8 ++++++--
>>  1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.66.7.bb
>> b/meta/recipes-core/glib-2.0/glib-2.0_2.66.7.bb
>> index 15e9dbaf6f..882a89da7a 100644
>> --- a/meta/recipes-core/glib-2.0/glib-2.0_2.66.7.bb
>> +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.66.7.bb
>> @@ -31,7 +31,7 @@ def find_meson_cross_files(d):
>>      if bb.data.inherits_class('native', d):
>>          return ""
>>
>> -    corebase = d.getVar("COREBASE")
>> +    thisdir = d.getVar("THISDIR")
>>      import collections
>>      sitedata = siteinfo_data(d)
>>      # filename -> found
>> @@ -39,7 +39,11 @@ def find_meson_cross_files(d):
>>      for path in d.getVar("FILESPATH").split(":"):
>>          for element in sitedata:
>>              filename = os.path.normpath(os.path.join(path,
>> "meson.cross.d", element))
>> -            files[filename.replace(corebase, "${COREBASE}")] =
>> os.path.exists(filename)
>> +            sanitized_path = filename.replace(thisdir, "${THISDIR}")
>> +            if sanitized_path == filename:
>> +                bb.error("Cannot add '%s' to --cross-file, because it's
>> not relative to THISDIR '%s' and sstate signature would contain this full
>> path" % (filename, thisdir))
>> +                continue
>> +            files[filename.replace(thisdir, "${THISDIR}")] =
>> os.path.exists(filename)
>>
>>      items = ["--cross-file=" + k for k,v in files.items() if v]
>>      d.appendVar("EXTRA_OEMESON", " " + " ".join(items))
>> --
>> 2.27.0
>>
>>
>> 
>>
>>

[-- Attachment #2: Type: text/html, Size: 5077 bytes --]

  reply	other threads:[~2021-03-02 17:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 17:45 [PATCH] glib-2.0: replace THISDIR instead of COREBASE in find_meson_cross_files --cross-file paths Martin Jansa
2021-03-02 17:14 ` [OE-core] " Anibal Limon
2021-03-02 17:32   ` Martin Jansa [this message]
2021-03-02 18:02     ` Geoff Parker
2021-03-02 19:00     ` [OE-core] " Anibal Limon
2021-03-02 20:55       ` Geoff Parker
     [not found]   ` <166896E0294231B3.17091@lists.openembedded.org>
2021-03-02 17:38     ` Martin Jansa
2021-03-02 17:43   ` Geoff Parker
2021-03-02 17:50     ` Martin Jansa

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='CA+chaQevEWE=RaqQzXfGOaQVCSw1Jf814EQF+-Cdx4X46xO1Fg@mail.gmail.com' \
    --to=martin.jansa@gmail.com \
    --cc=anibal.limon@linaro.org \
    --cc=nicolas.dechesne@linaro.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.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 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.