* [meta-virtualization][PATCH 1/1] notary: Define SRCREV_FORMAT to make it work with archiver.bbclass @ 2020-05-20 8:27 Robert Yang 2020-05-20 10:00 ` [PATCH " Robert Yang 0 siblings, 1 reply; 5+ messages in thread From: Robert Yang @ 2020-05-20 8:27 UTC (permalink / raw) To: bruce.ashfield; +Cc: meta-virtualization Fixed: INHERIT += "archiver" $ bitbake notary -car_original bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: The SRCREV_FORMAT variable must be set when multiple SCMs are used. The SCMs are: git://github.com/docker/notary.git;destsuffix=git/src/github.com/docker/notary git://github.com/docker/notary.git Another solution is define SRCREV_FORMAT in archiver.bbclass, but that doesn't work since it is too late to define it there. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> --- recipes-devtools/go/notary_git.bb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes-devtools/go/notary_git.bb b/recipes-devtools/go/notary_git.bb index 9cfb46e..76dfa8f 100644 --- a/recipes-devtools/go/notary_git.bb +++ b/recipes-devtools/go/notary_git.bb @@ -9,6 +9,11 @@ SRCNAME = "notary" PKG_NAME = "github.com/docker/${SRCNAME}" SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}" +# The archiver.bbclass will append a uri to SRC_URI when it contains +# destsuffix, then the SRC_URI would contain multilib SCMs, and bitbake's +# fetcher requires a SRCREV_FORMAT for multiple SCMs. +SRCREV_FORMAT = "${SRCNAME}" + SRCREV = "d6e1431feb32348e0650bf7551ac5cffd01d857b" PV = "0.6.1+git${SRCPV}" -- 2.17.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] notary: Define SRCREV_FORMAT to make it work with archiver.bbclass 2020-05-20 8:27 [meta-virtualization][PATCH 1/1] notary: Define SRCREV_FORMAT to make it work with archiver.bbclass Robert Yang @ 2020-05-20 10:00 ` Robert Yang 2020-05-20 11:26 ` [meta-virtualization] " Paul Barker 0 siblings, 1 reply; 5+ messages in thread From: Robert Yang @ 2020-05-20 10:00 UTC (permalink / raw) To: meta-virtualization [-- Attachment #1: Type: text/plain, Size: 156 bytes --] Hi Bruce, Please ignore this patch, I found more recipes in meta-virt have this issue, we need fix all of them or find a better solutions. // Robert [-- Attachment #2: Type: text/html, Size: 172 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [meta-virtualization] [PATCH 1/1] notary: Define SRCREV_FORMAT to make it work with archiver.bbclass 2020-05-20 10:00 ` [PATCH " Robert Yang @ 2020-05-20 11:26 ` Paul Barker 2020-05-20 11:29 ` Robert Yang 2020-05-20 12:22 ` Robert Yang 0 siblings, 2 replies; 5+ messages in thread From: Paul Barker @ 2020-05-20 11:26 UTC (permalink / raw) To: Robert Yang; +Cc: meta-virtualization On Wed, 20 May 2020 at 11:00, Robert Yang <liezhi.yang@windriver.com> wrote: > > Hi Bruce, > > Please ignore this patch, I found more recipes in meta-virt have this issue, we need fix all of them or find a better solutions. I think the issue should probably be logged against the archiver itself in the Yocto bugzilla. If the archiver is changing SRC_URI it should handle any consequences, not require recipes to adapt for it. -- Paul Barker Konsulko Group ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [meta-virtualization] [PATCH 1/1] notary: Define SRCREV_FORMAT to make it work with archiver.bbclass 2020-05-20 11:26 ` [meta-virtualization] " Paul Barker @ 2020-05-20 11:29 ` Robert Yang 2020-05-20 12:22 ` Robert Yang 1 sibling, 0 replies; 5+ messages in thread From: Robert Yang @ 2020-05-20 11:29 UTC (permalink / raw) To: Paul Barker; +Cc: meta-virtualization On 5/20/20 7:26 PM, Paul Barker wrote: > On Wed, 20 May 2020 at 11:00, Robert Yang <liezhi.yang@windriver.com> wrote: >> >> Hi Bruce, >> >> Please ignore this patch, I found more recipes in meta-virt have this issue, we need fix all of them or find a better solutions. > > I think the issue should probably be logged against the archiver > itself in the Yocto bugzilla. If the archiver is changing SRC_URI it > should handle any consequences, not require recipes to adapt for it. Yes, indeed, I'm working on that. // Robert > > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [meta-virtualization] [PATCH 1/1] notary: Define SRCREV_FORMAT to make it work with archiver.bbclass 2020-05-20 11:26 ` [meta-virtualization] " Paul Barker 2020-05-20 11:29 ` Robert Yang @ 2020-05-20 12:22 ` Robert Yang 1 sibling, 0 replies; 5+ messages in thread From: Robert Yang @ 2020-05-20 12:22 UTC (permalink / raw) To: Paul Barker; +Cc: meta-virtualization Hi Paul, On 5/20/20 7:26 PM, Paul Barker wrote: > On Wed, 20 May 2020 at 11:00, Robert Yang <liezhi.yang@windriver.com> wrote: >> >> Hi Bruce, >> >> Please ignore this patch, I found more recipes in meta-virt have this issue, we need fix all of them or find a better solutions. > > I think the issue should probably be logged against the archiver > itself in the Yocto bugzilla. If the archiver is changing SRC_URI it > should handle any consequences, not require recipes to adapt for it. Seems that I've figured the problem, do_ar_original has copy SRC_URI into the variable urls, then when call fetch = bb.fetch2.Fetch(urls, d), there would be duplicated urls as the error reported: git://github.com/docker/notary.git;destsuffix=git/src/github.com/docker/notary git://github.com/docker/notary.git The first one is from original SRC_URI, the second one is from the variable 'urls', so cleanup SRC_URI before call bb.fetch2.Fetch() can fix the problem. Here is the patch, I appreciate it if you can help to review before I send it to oe-core mailing list. diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 817b91207f..73d5aa7787 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass @@ -193,7 +193,13 @@ python do_ar_original() { del decoded[5][param] encoded = bb.fetch2.encodeurl(decoded) urls[i] = encoded - fetch = bb.fetch2.Fetch(urls, d) + + # Cleanup SRC_URI before call bb.fetch2.Fetch() since now SRC_URI is in the + # variable "urls", otherwise there might be errors like: + # The SRCREV_FORMAT variable must be set when multiple SCMs are used + ld = bb.data.createCopy(d) + ld.setVar('SRC_URI', '') + fetch = bb.fetch2.Fetch(urls, ld) tarball_suffix = {} for url in fetch.urls: local = fetch.localpath(url).rstrip("/"); // Robert > > > > ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-20 12:23 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-05-20 8:27 [meta-virtualization][PATCH 1/1] notary: Define SRCREV_FORMAT to make it work with archiver.bbclass Robert Yang 2020-05-20 10:00 ` [PATCH " Robert Yang 2020-05-20 11:26 ` [meta-virtualization] " Paul Barker 2020-05-20 11:29 ` Robert Yang 2020-05-20 12:22 ` Robert Yang
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.