All of lore.kernel.org
 help / color / mirror / Atom feed
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
To: Patrick Williams <patrick@stwcx.xyz>,
	Alexander Kanavin <alex.kanavin@gmail.com>
Cc: Paulo Neves <ptsneves@gmail.com>,
	bitbake-devel <bitbake-devel@lists.openembedded.org>,
	Richard Purdie <richard.purdie@linuxfoundation.org>
Subject: Re: [bitbake-devel] [PATCH 2/2] fetch: bb.fatal when trying to checksum non-existing files.
Date: Wed, 27 Jul 2022 16:50:37 +0200	[thread overview]
Message-ID: <f3f31635-e216-d11a-d30d-dbedb6ed3335@theobroma-systems.com> (raw)
In-Reply-To: <YuAPBJrwSDriYmTZ@heinlein.stwcx.org.github.beta.tailscale.net>

Hi Patrick,

On 7/26/22 17:57, Patrick Williams wrote:
> On Tue, Jul 26, 2022 at 07:35:21AM +0200, Alexander Kanavin wrote:
>> On Tue, 26 Jul 2022 at 06:09, Patrick Williams <patrick@stwcx.xyz> wrote:
>>> There are some more complex examples, but one easy example is a recipe
>>> which had `file://${MACHINE}/eeprom.h` in its SRC_URI[1].  Any machine
>>> which didn't provide this file, even if it never intended to use the
>>> recipe, now fails when we picked up this change.
>>
>> This is not how machine-specific versions of the same file are
>> supposed to be listed. Just use `file://eeprom.h`, and bitbake will
>> look for it in subdirectories that include $MACHINE, and if not found
>> there, a default version will be picked (which you can make bogus, so
>> builds will fail at recipe build stage instead of parsing stage).
>>
>> Example:
>> https://git.yoctoproject.org/poky/tree/meta/recipes-graphics/xorg-xserver/xserver-xf86-config?h=master-next
> 
> I agree.  The person who originally wrote the recipe didn't know about
> the automatic addition of overrides with the FILESEXTRAPATHS.  As I
> wrote this was just one easy example.  I fixed this one to both use the
> override implicitly (as you also suggested) and put a default 'eeprom.h'
> with a `#error`[1].
> 
> A seriously more complex example we have is that we have our own u-boot
> recipes and used the same `u-boot-foo.inc` file names as are present in
> `meta/`.  It happens that the recipes in `meta/recipes-bsp/u-boot` end
> up, even though we'd never use them, using our `u-boot-foo.inc` files
> and ending up with totally bogus SRC_URIs in the parsing phase (and
> thus failing).  Essentially, whenever there is a new version of u-boot
> in `meta` we're going to end up having to make some bogus empty
> files[2].
> 

Alexander already suggested to use a slightly different recipe name (and 
then you can pick which recipe you want from a configuration file with 
PREFERRED_PROVIDER_u-boot = "" IIRC), but I'm actually surprised by the 
behavior you mention seeing.

The original u-boot recipe uses "require" with just the filename, c.f. 
https://cgit.openembedded.org/openembedded-core/tree/meta/recipes-bsp/u-boot/u-boot_2022.07.bb?h=master, 
etc... there's not a single recipes-bsp/u-boot returned by git grep in 
openembedded-core... My understanding of the require mechanism so far is 
that if you pass it a filename, it'll only look into the current 
directory (where the recipe is located) and if it has a path, it'll look 
for that path in all layers (well, BBPATH, which in the majority of 
cases should be LAYERDIR, the root of the layer). Since there is no path 
in require for the u-boot recipes in openmebedded-core, I don't 
understand what you're saying happens happens. c.f. 
https://docs.yoctoproject.org/bitbake/bitbake-user-manual/bitbake-user-manual-metadata.html#require-directive 
for the doc on require directive.

This highlights one of the following:
  - a rogue bbappend or some weird configuration in one the layers in use,
  - a bug/corner-case in require directive,

Maybe there's something to fix or document, hence why I'm writing this 
mail, it'd be good to actually be able to reproduce this and understand 
why it happens.

Cheers,
Quentin


  parent reply	other threads:[~2022-07-27 14:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08 20:54 [PATCH 1/2] fetch2: local files only in DL_DIR becomes fatal error Paulo Neves
2022-07-08 20:54 ` [PATCH 2/2] fetch: bb.fatal when trying to checksum non-existing files Paulo Neves
2022-07-13  9:48   ` [bitbake-devel] " Alexandre Belloni
2022-07-13 10:10     ` Paulo Neves
2022-07-13 12:28       ` Richard Purdie
2022-07-26  4:09   ` Patrick Williams
2022-07-26  5:35     ` [bitbake-devel] " Alexander Kanavin
2022-07-26 15:57       ` Patrick Williams
2022-07-27 12:00         ` Alexander Kanavin
2022-07-27 14:50         ` Quentin Schulz [this message]
2022-07-27 19:16           ` Patrick Williams
2022-07-26  6:39     ` Richard Purdie
2022-07-26  7:01       ` Paulo Neves
2022-07-26 16:01         ` Patrick Williams
2022-07-09  6:52 ` [bitbake-devel] [PATCH 1/2] fetch2: local files only in DL_DIR becomes fatal error Richard Purdie
2022-07-09  7:19   ` Paulo Neves
     [not found]     ` <a7dffab1-9b0c-fab8-a538-81c3d0065834@gmail.com>
2022-07-09 13:20       ` Richard Purdie

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=f3f31635-e216-d11a-d30d-dbedb6ed3335@theobroma-systems.com \
    --to=quentin.schulz@theobroma-systems.com \
    --cc=alex.kanavin@gmail.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=patrick@stwcx.xyz \
    --cc=ptsneves@gmail.com \
    --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.