| Summary: | Devtool modify failed if recipe doesn't do git properly | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Prabin CA <prabin.ca> | ||||
| Component: | devtools / tool chain | Assignee: | Ross Burton <ross.burton> | ||||
| Status: | RESOLVED OBSOLETE | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | Medium | CC: | abdellatif.elkhlifi, jstephan, meta.mr.watcher, meta.watcher, randy.macleod, richard.purdie, ross.burton | ||||
| Version: | 3.1.2 | ||||||
| Target Milestone: | 4.3 | ||||||
| Hardware: | x86 | ||||||
| OS: | arm64 | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||
| Attachments: |
|
||||||
|
Description
Prabin CA
2020-09-30 04:19:07 UTC
Replicated with meta-arm master and MACHINE=n1sdp. The problem is how edk2-firmware clones in a manner that devtool doesn't expect:
modified: edk2 (untracked content)
${S} isn't in fact a git repository, but a directory that contains a git repository.
We can fix this in meta-arm so that devtool works as expected, but it would be nice if devtool handled this case.
Basically the situation is:
S=${WORKDIR}/git
SRC_URI=git://foo.com;destsuffix=${S}/foo
WORKDIR/git is just a normal directory containing foo, a git clone.
Summary: devtool expects a recipe using the git fetcher to unpack a git repository in S. This is a fair assumption, and I think in this case devtool should just detect and abort cleanly. Our original reproducer is now fixed with meta-arm ed66883f144d5c30ee081a08bb57391b0a749622. devtool not handling this situation nicely is still a valid issue. Need to verify this is still a problem. Moved en masse from 4.2 to 4.3 by Randy. Hi,
just tried to reproduce using:
S=${WORKDIR}/git
SRC_URI=git://foo.com;destsuffix=${S}/foo
but it seems that it is not allowed anymore to use ${S} in SRC_URI. I now get the following error:
bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: There are recursive references in fetcher variables, likely through SRC_URI
The variable dependency chain for the failure is: SRCPV -> PV -> WORKDIR -> S -> SRC_URI -> SRCPV -> PV -> BP -> FILESPATH
(In reply to Julien Stephan from comment #6) > Hi, > just tried to reproduce using: > > S=${WORKDIR}/git > SRC_URI=git://foo.com;destsuffix=${S}/foo > > but it seems that it is not allowed anymore to use ${S} in SRC_URI. I now > get the following error: > > bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression > was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: > Fetcher failure: There are recursive references in fetcher variables, likely > through SRC_URI > > The variable dependency chain for the failure is: SRCPV -> PV -> WORKDIR -> > S -> SRC_URI -> SRCPV -> PV -> BP -> FILESPATH Correct, using ${S} in SRC_URI is a bad idea as we can need to query the source to work out PV and you get a circular dependency. You probably want a relative path rather than an absolute one. Hi Richard,
I tried to reproduce using
S=${WORKDIR}/git/foo
SRC_URI=git://foo.com;destsuffix=git/foo
but still not reproducing the error, so maybe this is not an issue anymore?
Hi all, closing this bug as I cannot reproduce it. |