All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tomasz Dziendzielski" <tomasz.dziendzielski@gmail.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel] [PATCH] event: Prevent bitbake from executing event handler for wrong multiconfig target
Date: Fri, 5 Feb 2021 16:13:29 +0100	[thread overview]
Message-ID: <CAJkqNs368ngV4pqUemfq6vmo2atjVTzh7S_=ki-7J2koNFOxcw@mail.gmail.com> (raw)
In-Reply-To: <f07ad5d24c64acc060ae71e91973b869da27824d.camel@linuxfoundation.org>

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

>No, that is definitely going to just mask the problem.
>
>These tests are designed to detect problems which will cause us "pain"
>later. The hashes are designed to be stable to whether something is
>built as a multiconfig or not shouldn't change its hashes. The tests
>are warning us that this is happening so we need to fix that.

Thanks, I think I already found the solution. I need to add the mc prefix
before it is written to __BBHANDLERS variable and now I don't see any
metadata hashes changing on test. I will submit a patch after oe-selftest
for multiconfig finishes with success.

@@ -259,6 +259,9 @@ class BBHandlerNode(AstNode):
     def eval(self, data):
         bbhands = data.getVar('__BBHANDLERS', False) or []
         for h in self.hs:
+            if data.getVar('BB_CURRENT_MC', False):
+                h = data.getVar('BB_CURRENT_MC', False) + h
+             bbhands.append(h)
             data.setVarFlag(h, "handler", 1)
         data.setVar('__BBHANDLERS', bbhands)

Best regards,
Tomasz Dziendzielski

pt., 5 lut 2021 o 15:42 Richard Purdie <richard.purdie@linuxfoundation.org>
napisał(a):

> On Fri, 2021-02-05 at 15:26 +0100, Tomasz Dziendzielski wrote:
> > I can already see the bitbake test failed, after adding "if d" it
> > passed. Sorry that I forgot to run tests before submitting a patch.
> > Another thing, I ran locally oe-selftest -r multiconfig and build
> > fails with "When reparsing %s, the basehash value changed from %s to
> > %s. The metadata is not deterministic and this needs to be fixed".
> > During the build it appeared only if I made changes to the code
> > during the build. Here it's most probably caused because of events'
> > handlers renaming.
>
> That is going to be a problem, we need to make sure the hashes are
> deterministic.
>
> > Do you think there is some way to handle this issue or I should just
> > add:
> >          ignore_mismatch = ((d.getVar("BB_HASH_IGNORE_MISMATCH") or
> > '') == '1')
> > +        if d.getVar("__BBMULTICONFIG", False):
> > +            ignore_mismatch = True
> > to bitbake/lib/bb/siggen.py?
>
> No, that is definitely going to just mask the problem.
>
> These tests are designed to detect problems which will cause us "pain"
> later. The hashes are designed to be stable to whether something is
> built as a multiconfig or not shouldn't change its hashes. The tests
> are warning us that is happening so we need to fix that.
>
> Cheers,
>
> Richard
>
>

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

      reply	other threads:[~2021-02-05 15:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 22:14 [PATCH] event: Prevent bitbake from executing event handler for wrong multiconfig target Tomasz Dziendzielski
2021-02-05 12:17 ` [bitbake-devel] " Richard Purdie
2021-02-05 14:26   ` Tomasz Dziendzielski
2021-02-05 14:42     ` Richard Purdie
2021-02-05 15:13       ` Tomasz Dziendzielski [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='CAJkqNs368ngV4pqUemfq6vmo2atjVTzh7S_=ki-7J2koNFOxcw@mail.gmail.com' \
    --to=tomasz.dziendzielski@gmail.com \
    --cc=bitbake-devel@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.