Yocto Project Discussions
 help / color / mirror / Atom feed
From: "Chris Wyse" <chris.wyse@wysechoice.net>
To: yocto@lists.yoctoproject.org
Subject: Re: Devtool fails if SRCREV is set to ${AUTOREV} #kirkstone #devtool #yocto
Date: Wed, 08 Nov 2023 08:28:53 -0800	[thread overview]
Message-ID: <30457.1699460933018528490@lists.yoctoproject.org> (raw)
In-Reply-To: <CANNYZj-sTnUxqyHM2W9TXPJK8-eTwo-5o3V6D3D5wXPNi7Lo=A@mail.gmail.com>

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

I ran into this problem as well.  It doesn't seem like SRCPV is being set properly before use in the externalsrc.bbclass.  I added the following line before bpn = d.getVar('BPN'), and now it works fine.  Unfortunately, I needed to create another layer that overrides the poky classes to include it in my build.  Here's the added line:

srcpv = d.getVar('SRCPV')

And here's a bit of context:

python () {
externalsrc = d.getVar('EXTERNALSRC')
externalsrcbuild = d.getVar('EXTERNALSRC_BUILD')

if externalsrc and not externalsrc.startswith("/"):
bb.error("EXTERNALSRC must be an absolute path")
if externalsrcbuild and not externalsrcbuild.startswith("/"):
bb.error("EXTERNALSRC_BUILD must be an absolute path")

srcpv = d.getVar('SRCPV')

# If this is the base recipe and EXTERNALSRC is set for it or any of its
# derivatives, then enable BB_DONT_CACHE to force the recipe to always be
# re-parsed so that the file-checksums function for do_compile is run every
# time.
bpn = d.getVar('BPN')
classextend = (d.getVar('BBCLASSEXTEND') or '').split()
if bpn == d.getVar('PN') or not classextend:
if (externalsrc or
('native' in classextend and
d.getVar('EXTERNALSRC:pn-%s-native' % bpn)) or
('nativesdk' in classextend and
d.getVar('EXTERNALSRC:pn-nativesdk-%s' % bpn)) or
('cross' in classextend and
d.getVar('EXTERNALSRC:pn-%s-cross' % bpn))):
d.setVar('BB_DONT_CACHE', '1')

if externalsrc:
import oe.recipeutils
import oe.path

d.setVar('S', externalsrc)
if externalsrcbuild:
d.setVar('B', externalsrcbuild)
else:
d.setVar('B', '${WORKDIR}/${BPN}-${PV}')

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

  reply	other threads:[~2023-11-08 17:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18 10:32 Devtool fails if SRCREV is set to ${AUTOREV} #kirkstone #devtool #yocto shibi.cbe
2022-08-26 20:38 ` acox
2023-07-11 21:54   ` Tom Isaacson
2023-07-12 17:03     ` [yocto] " Alexander Kanavin
2023-07-12 17:43       ` Tom Isaacson
2023-07-12 17:55         ` Alexander Kanavin
2023-11-08 16:28           ` Chris Wyse [this message]
2023-11-08 22:59             ` Yoann Congal

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=30457.1699460933018528490@lists.yoctoproject.org \
    --to=chris.wyse@wysechoice.net \
    --cc=yocto@lists.yoctoproject.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