All of lore.kernel.org
 help / color / mirror / Atom feed
From: richard.purdie@linuxfoundation.org
To: Sinan Kaya <Okaya@kernel.org>,
	Alexander Kanavin <alex.kanavin@gmail.com>,
	 ChenQi <Qi.Chen@windriver.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH v1] postinst-intercepts: check tool presence in intercept hooks
Date: Thu, 27 Jun 2019 09:57:22 +0100	[thread overview]
Message-ID: <b0f7d25c1d75b677f5f8bd9587a7cc054766587f.camel@linuxfoundation.org> (raw)
In-Reply-To: <5c9f4824-248c-197c-c3f7-ccd33f023aa3@kernel.org>

On Wed, 2019-06-26 at 18:57 -0400, Sinan Kaya wrote:
> On 6/26/2019 5:21 PM, Richard Purdie wrote:
> > > What is so special about these?
> > Put another way, why aren't lots of people seeing failures due to
> > this?
> > 
> > You're obviously doing something differently to everyone else but
> > we're
> > having a hard time understanding what, or how we'd trigger the
> > problem
> > you're seeing. 
> > 
> > We're nervous about fixing problems we don't understand, not least
> > as
> > it potentially means we have a huge hole in our test matrix. Your
> > patches shouldn't be necessary as I understand the codebase either.
> 
> Let's see if we can peel the onion.
> 
> Can you explain how it was designed to work for cross compilation use
> case where host machine architecture != target machine architecture ?

postinst intercepts are there to collect up certain postinst commands
and call them once rather than multiple times during rootfs generation.

There are three different cases:

a) Sometimes we can use a native tool. Here, we run the native tool
with the knowledge that the output it generates is cross compatible.

b) Sometimes we run target binaries under usermode qemu. In this case
the output is target architecture specific and we have no other way to
generate the output other than with the target binary

c) We have a cross tool which can run natively but generate target
output.

> If I understand this right, all of these postinst intercepts create
> a native package dependency via inherit foobar.class.
> 
> AFAIK, Native packages are built against the host machine
> architecture not target architecture.
> 
> Where are the tools supposed to come from?

It depends which scenario above we're dealing with. Sometimes native
recipes are used, sometimes not.

> I can focus on details if my build actually follows the design.
> 
> As I said, I do not want these packages on my target machine but we
> want to run QEMU using the tools that were compiled against target
> machine in order to execute postinst intercepts.
> 
> This issue showed up in thud using core-image-minimal. It was not
> there on sumo.

The key thing is that these intercept scripts are only run if an image
contains packages which use the postinst. If the image contains the
postinst, the scripts should run correctly.

In that context your patch is concerning as for example you're saying
you can have an image which needs the gio module cache yet it doesn't
have ${libexecdir}/${binprefix}gio-querymodules (the target binary
needed to be run under qemu to generate it). We'd define that as a bug
and you're just hiding the problem with the added conditionals. So on
that basis the patch is clearly incorrect and can't be merged as it
will hide bugs.

Cheers,

Richard




      parent reply	other threads:[~2019-06-27  8:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25 22:13 [PATCH v1] postinst-intercepts: check tool presence in intercept hooks Sinan Kaya
2019-06-26  2:27 ` ChenQi
2019-06-26  8:59   ` Alexander Kanavin
2019-06-26 17:33     ` Sinan Kaya
2019-06-26 18:10       ` Alexander Kanavin
2019-06-26 21:21       ` Richard Purdie
2019-06-26 22:57         ` Sinan Kaya
2019-06-27  8:46           ` Alexander Kanavin
2019-06-30 16:56             ` Sinan Kaya
2019-06-30 21:54               ` richard.purdie
2019-07-01  1:38                 ` Sinan Kaya
2019-06-27  8:57           ` richard.purdie [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=b0f7d25c1d75b677f5f8bd9587a7cc054766587f.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=Okaya@kernel.org \
    --cc=Qi.Chen@windriver.com \
    --cc=alex.kanavin@gmail.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 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.