On Thu, Dec 16, 2021 at 7:53 AM Matt Madison via
lists.openembedded.org <matt=madison.syst...@lists.openembedded.org>
wrote:
>
> On Thu, Dec 16, 2021 at 6:47 AM Joshua Watt <jpewhac...@gmail.com> wrote:
> >
> > On Wed, Dec 15, 2021 at 8:16 AM Matt Madison <matt@madison.systems> wrote:
> > >
> > > I'm finding that none of the Rust recipes are getting setscened in my 
> > > builds off
> > > master due to the the SRCPV hack that was added to make the cargo fetcher
> > > visible during parsing. There's no error reported about it, but by adding 
> > > an
> > > exception handler into the sstate code I tracked it down to 
> > > pstaging_fetch()'s
> > > using d.getVar('SRCPV').  Since the cargo fetcher doesn't advertise
> > > srcrev support,
> > > the base fetcher class raises an exception on this, causing the
> > > mostly-silent failure.
> >
> > Hmm, this is strange. I have this recipe:
> > https://github.com/JPEWdev/meta-phosh/blob/master/recipes-graphics/squeekboard/squeekboard_git.bb
> > that is using the cargo fetcher and it is definitely using sstate like
> > I would expect; perhaps there is some other strange interaction with
> > another class?
>
> I'm just talking about the rust toolchain, libstd-rs, cargo, etc.
> It's simple enough for me to reproduce with a bare-bones setup:
>
> 1. clone openembedded-core and bitbake
> 2. init build environment
> 3. set MACHINE="qemuarm64" in local.conf
> 4. bitbake librsvg
> 5. Copy sstate-cache contents to a web server
> 6. Wipe build workspace, re-init, and set SSTATE_MIRRORS to point to
> the web server
> 7. bitbake --setscene-only librsvg
>
> I've attached the cooker log of a sample build.  You'll see from the
> sstate summary that everything was found, but there will be warnings
> when executing the setscenes.

And if I apply the following patch:
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 0326d27c74..ffc3b08b7d 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -761,7 +761,12 @@ def pstaging_fetch(sstatefetch, d):
     localdata.setVar('FILESPATH', dldir)
     localdata.setVar('DL_DIR', dldir)
     localdata.setVar('PREMIRRORS', mirrors)
-    localdata.setVar('SRCPV', d.getVar('SRCPV'))
+    try:
+        curpv = d.getVar('SRCPV')
+    except Exception as e:
+        bb.warn("Failed to get SRCPV: %s" % e)
+        curpv = ''
+    localdata.setVar('SRCPV', curpv)

the setscenes work, and the warning is:

WARNING: libstd-rs-1.57.0-r0 do_packagedata_setscene: Failed to get
SRCPV: Failure expanding variable SRCPV, expression was
${@crate_get_srcrev(d)} which triggered exception FetchError: Fetcher
failure: SRCREV was used yet no valid SCM was found in SRC_URI
The variable dependency chain for the failure is: SRCPV

I'm just not sure whether that's the right place to fix this.

-M


>
> -Matt
>
> >
> > >
> > > There's no issue if the sstate package is already in the local cache;
> > > it only affects
> > > builds where I need to fetch from my sstate mirror.
> > >
> > > I'd submit a patch, but I'm not sure what the right solution would be.
> > >
> > > Regards,
> > > -Matt
> > >
> > >
> > >
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#159798): 
https://lists.openembedded.org/g/openembedded-core/message/159798
Mute This Topic: https://lists.openembedded.org/mt/87744591/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to