* [PATCH 0/1] archiver.bbclass: Fix duplicated SRC_URIs for do_ar_original @ 2020-05-21 4:05 Robert Yang 2020-05-21 4:05 ` [PATCH 1/1] " Robert Yang 0 siblings, 1 reply; 3+ messages in thread From: Robert Yang @ 2020-05-21 4:05 UTC (permalink / raw) To: openembedded-core; +Cc: pbarker The following changes since commit 586061c469a3340ec3a60ff59dae2e9ee33c3398: qemu: fix CVE-2020-11869 (2020-05-19 22:55:50 +0100) are available in the Git repository at: git://git.openembedded.org/openembedded-core-contrib rbt/ar_srcuri http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/ar_srcuri Robert Yang (1): archiver.bbclass: Fix duplicated SRC_URIs for do_ar_original meta/classes/archiver.bbclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 2.21.0 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] archiver.bbclass: Fix duplicated SRC_URIs for do_ar_original 2020-05-21 4:05 [PATCH 0/1] archiver.bbclass: Fix duplicated SRC_URIs for do_ar_original Robert Yang @ 2020-05-21 4:05 ` Robert Yang 2020-05-21 8:41 ` [OE-core] " Richard Purdie 0 siblings, 1 reply; 3+ messages in thread From: Robert Yang @ 2020-05-21 4:05 UTC (permalink / raw) To: openembedded-core; +Cc: pbarker The argument urls of bb.fetch2.Fetch(urls, d) are duplicated to SRC_URI, which caused errors like: 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 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. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> --- meta/classes/archiver.bbclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 43333a7551..780c562b68 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("/"); -- 2.21.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH 1/1] archiver.bbclass: Fix duplicated SRC_URIs for do_ar_original 2020-05-21 4:05 ` [PATCH 1/1] " Robert Yang @ 2020-05-21 8:41 ` Richard Purdie 0 siblings, 0 replies; 3+ messages in thread From: Richard Purdie @ 2020-05-21 8:41 UTC (permalink / raw) To: Robert Yang, openembedded-core; +Cc: pbarker On Wed, 2020-05-20 at 21:05 -0700, Robert Yang wrote: > The argument urls of bb.fetch2.Fetch(urls, d) are duplicated to SRC_URI, which caused errors like: > > 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 > > 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. > > Signed-off-by: Robert Yang <liezhi.yang@windriver.com> > --- > meta/classes/archiver.bbclass | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass > index 43333a7551..780c562b68 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("/"); Well found! I've starred at that code for a different issue and not spotted that! Cheers, Richard ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-21 8:42 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-05-21 4:05 [PATCH 0/1] archiver.bbclass: Fix duplicated SRC_URIs for do_ar_original Robert Yang 2020-05-21 4:05 ` [PATCH 1/1] " Robert Yang 2020-05-21 8:41 ` [OE-core] " Richard Purdie
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.