All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] go-build: add SRCREV_FORMAT
@ 2023-08-28 20:28 Javier Tia
  2023-08-29  2:20 ` [meta-virtualization] " Bruce Ashfield
  2023-09-04  6:39 ` Mikko Rapeli
  0 siblings, 2 replies; 5+ messages in thread
From: Javier Tia @ 2023-08-28 20:28 UTC (permalink / raw)
  To: meta-virtualization; +Cc: Javier Tia

Recipes that use multiple SCMs in the SRC_URI, must supply SRCREV_FORMAT
to avoid an expansion error.

Signed-off-by: Javier Tia <javier.tia@linaro.org>
---
 recipes-devtools/go/go-build_git.bb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/recipes-devtools/go/go-build_git.bb b/recipes-devtools/go/go-build_git.bb
index 2337c9e1..2a78be01 100644
--- a/recipes-devtools/go/go-build_git.bb
+++ b/recipes-devtools/go/go-build_git.bb
@@ -4,12 +4,12 @@ DESCRIPTION = "Xen Runtime for OCI"
 
 SRCREV_runx = "f24efd33fb18469e9cfe4d1bfe8e2c90ec8c4e93"
 SRCREV_runc = "1e7bb5b773162b57333d57f612fd72e3f8612d94"
-
+SRCREV_FORMAT = "runx"
 SRC_URI = "\
-	  git://github.com/lf-edge/runx;nobranch=1;name=runx;protocol=https \
-          git://github.com/opencontainers/runc;branch=release-1.1;name=runc;protocol=https;destsuffix=git/src/import/gobuild/go/src/github.com/opencontainers/runc \
-          file://0001-build-use-instead-of-go.patch \
-	  "
+    git://github.com/lf-edge/runx;nobranch=1;name=runx;protocol=https \
+    git://github.com/opencontainers/runc;branch=release-1.1;name=runc;protocol=https;destsuffix=git/src/import/gobuild/go/src/github.com/opencontainers/runc \
+    file://0001-build-use-instead-of-go.patch \
+"
 SRC_URI[md5sum] = "0d701ac1e2a67d47ce7127432df2c32b"
 SRC_URI[sha256sum] = "5a26478906d5005f4f809402e981518d2b8844949199f60c4b6e1f986ca2a769"
 
-- 
2.42.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [meta-virtualization] [PATCH] go-build: add SRCREV_FORMAT
  2023-08-28 20:28 [PATCH] go-build: add SRCREV_FORMAT Javier Tia
@ 2023-08-29  2:20 ` Bruce Ashfield
  2023-08-29 18:05   ` Javier Tia
  2023-09-04  6:39 ` Mikko Rapeli
  1 sibling, 1 reply; 5+ messages in thread
From: Bruce Ashfield @ 2023-08-29  2:20 UTC (permalink / raw)
  To: Javier Tia; +Cc: meta-virtualization

On Mon, Aug 28, 2023 at 4:28 PM Javier Tia <javier.tia@linaro.org> wrote:
>
> Recipes that use multiple SCMs in the SRC_URI, must supply SRCREV_FORMAT
> to avoid an expansion error.
>
> Signed-off-by: Javier Tia <javier.tia@linaro.org>
> ---
>  recipes-devtools/go/go-build_git.bb | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/recipes-devtools/go/go-build_git.bb b/recipes-devtools/go/go-build_git.bb
> index 2337c9e1..2a78be01 100644
> --- a/recipes-devtools/go/go-build_git.bb
> +++ b/recipes-devtools/go/go-build_git.bb
> @@ -4,12 +4,12 @@ DESCRIPTION = "Xen Runtime for OCI"
>
>  SRCREV_runx = "f24efd33fb18469e9cfe4d1bfe8e2c90ec8c4e93"
>  SRCREV_runc = "1e7bb5b773162b57333d57f612fd72e3f8612d94"
> -
> +SRCREV_FORMAT = "runx"
>  SRC_URI = "\
> -         git://github.com/lf-edge/runx;nobranch=1;name=runx;protocol=https \
> -          git://github.com/opencontainers/runc;branch=release-1.1;name=runc;protocol=https;destsuffix=git/src/import/gobuild/go/src/github.com/opencontainers/runc \
> -          file://0001-build-use-instead-of-go.patch \
> -         "
> +    git://github.com/lf-edge/runx;nobranch=1;name=runx;protocol=https \
> +    git://github.com/opencontainers/runc;branch=release-1.1;name=runc;protocol=https;destsuffix=git/src/import/gobuild/go/src/github.com/opencontainers/runc \
> +    file://0001-build-use-instead-of-go.patch \
> +"

There's some extra whitespace and formatting changes in the patch, it's a good
policy to not mix them in with a fix.

In a scenario like this, I tend to use the representative SCMs in the
format. So in this
case it should be runx_runc. There are some exceptions to this in the
tree, and I need
to fix them.

I've spun a patch with just that for master-next.

Bruce


>  SRC_URI[md5sum] = "0d701ac1e2a67d47ce7127432df2c32b"
>  SRC_URI[sha256sum] = "5a26478906d5005f4f809402e981518d2b8844949199f60c4b6e1f986ca2a769"
>
> --
> 2.42.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#8250): https://lists.yoctoproject.org/g/meta-virtualization/message/8250
> Mute This Topic: https://lists.yoctoproject.org/mt/101018420/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


--
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [meta-virtualization] [PATCH] go-build: add SRCREV_FORMAT
  2023-08-29  2:20 ` [meta-virtualization] " Bruce Ashfield
@ 2023-08-29 18:05   ` Javier Tia
  0 siblings, 0 replies; 5+ messages in thread
From: Javier Tia @ 2023-08-29 18:05 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization

On 8/28/23 20:20, Bruce Ashfield wrote:
> There's some extra whitespace and formatting changes in the patch, it's 
> a good policy to not mix them in with a fix. In a scenario like this, I 
> tend to use the representative SCMs in the format. So in this case it 
> should be runx_runc. There are some exceptions to this in the tree, and 
> I need to fix them. I've spun a patch with just that for master-next.

Thank you, Bruce, for taking care of that.

Regards,
» Javier Tia 🖋



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [meta-virtualization] [PATCH] go-build: add SRCREV_FORMAT
  2023-08-28 20:28 [PATCH] go-build: add SRCREV_FORMAT Javier Tia
  2023-08-29  2:20 ` [meta-virtualization] " Bruce Ashfield
@ 2023-09-04  6:39 ` Mikko Rapeli
  2023-09-04 13:58   ` Bruce Ashfield
  1 sibling, 1 reply; 5+ messages in thread
From: Mikko Rapeli @ 2023-09-04  6:39 UTC (permalink / raw)
  To: meta-virtualization; +Cc: Javier Tia

Hi, would be nice to get this applied as it fixes this parsing
error from latest poky master branch:

Parsing recipes...WARNING: /oe/build/../meta-virtualization/recipes-devtools/go/go-build_git.bb: Exception during build_dependencies for fetcher_hashes_dummyfunc
WARNING: /oe/build/../meta-virtualization/recipes-devtools/go/go-build_git.bb: Error during finalise of /oe/build/../meta-virtualization/recipes-devtools/go/go-build_git.bb
ERROR: ExpansionError during parsing /oe/build/../meta-virtualization/recipes-devtools/go/go-build_git.bb
Traceback (most recent call last):
  File "Var <fetcher_hashes_dummyfunc[vardepvalue]>", line 1, in <module>
  File "/oe/poky/bitbake/lib/bb/fetch2/__init__.py", line 834, in get_hashvalue(d=<bb.data_smart.DataSmart object at 0x7f0fd64ce640>, method_name='sortable_revision'):
     def get_hashvalue(d, method_name='sortable_revision'):
    >    pkgv, revs = _get_srcrev(d, method_name=method_name)
         return " ".join(revs)
  File "/oe/poky/bitbake/lib/bb/fetch2/__init__.py", line 804, in _get_srcrev(d=<bb.data_smart.DataSmart object at 0x7f0fd64ce640>, method_name='sortable_revision'):
         if not format:
    >        raise FetchError("The SRCREV_FORMAT variable must be set when multiple SCMs are used.\n"\
                              "The SCMs are:\n%s" % '\n'.join(scms))
bb.data_smart.ExpansionError: Failure expanding variable fetcher_hashes_dummyfunc[vardepvalue], expression was ${@bb.fetch.get_hashvalue(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/lf-edge/runx;nobranch=1;name=runx;protocol=https
git://github.com/opencontainers/runc;branch=release-1.1;name=runc;protocol=https;destsuffix=git/src/import/gobuild/go/src/github.com/opencontainers/runc
The variable dependency chain for the failure is: fetcher_hashes_dummyfunc[vardepvalue]

ERROR: Parsing halted due to errors, see error messages above

Cheers,

-Mikko

On Mon, Aug 28, 2023 at 02:28:34PM -0600, Javier Tia wrote:
> Recipes that use multiple SCMs in the SRC_URI, must supply SRCREV_FORMAT
> to avoid an expansion error.
> 
> Signed-off-by: Javier Tia <javier.tia@linaro.org>
> ---
>  recipes-devtools/go/go-build_git.bb | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/recipes-devtools/go/go-build_git.bb b/recipes-devtools/go/go-build_git.bb
> index 2337c9e1..2a78be01 100644
> --- a/recipes-devtools/go/go-build_git.bb
> +++ b/recipes-devtools/go/go-build_git.bb
> @@ -4,12 +4,12 @@ DESCRIPTION = "Xen Runtime for OCI"
>  
>  SRCREV_runx = "f24efd33fb18469e9cfe4d1bfe8e2c90ec8c4e93"
>  SRCREV_runc = "1e7bb5b773162b57333d57f612fd72e3f8612d94"
> -
> +SRCREV_FORMAT = "runx"
>  SRC_URI = "\
> -	  git://github.com/lf-edge/runx;nobranch=1;name=runx;protocol=https \
> -          git://github.com/opencontainers/runc;branch=release-1.1;name=runc;protocol=https;destsuffix=git/src/import/gobuild/go/src/github.com/opencontainers/runc \
> -          file://0001-build-use-instead-of-go.patch \
> -	  "
> +    git://github.com/lf-edge/runx;nobranch=1;name=runx;protocol=https \
> +    git://github.com/opencontainers/runc;branch=release-1.1;name=runc;protocol=https;destsuffix=git/src/import/gobuild/go/src/github.com/opencontainers/runc \
> +    file://0001-build-use-instead-of-go.patch \
> +"
>  SRC_URI[md5sum] = "0d701ac1e2a67d47ce7127432df2c32b"
>  SRC_URI[sha256sum] = "5a26478906d5005f4f809402e981518d2b8844949199f60c4b6e1f986ca2a769"
>  
> -- 
> 2.42.0
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#8250): https://lists.yoctoproject.org/g/meta-virtualization/message/8250
> Mute This Topic: https://lists.yoctoproject.org/mt/101018420/7159507
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [mikko.rapeli@linaro.org]
> -=-=-=-=-=-=-=-=-=-=-=-
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [meta-virtualization] [PATCH] go-build: add SRCREV_FORMAT
  2023-09-04  6:39 ` Mikko Rapeli
@ 2023-09-04 13:58   ` Bruce Ashfield
  0 siblings, 0 replies; 5+ messages in thread
From: Bruce Ashfield @ 2023-09-04 13:58 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: meta-virtualization, Javier Tia

On Mon, Sep 4, 2023 at 2:39 AM Mikko Rapeli <mikko.rapeli@linaro.org> wrote:
>
> Hi, would be nice to get this applied as it fixes this parsing
> error from latest poky master branch:
>
> Parsing recipes...WARNING: /oe/build/../meta-virtualization/recipes-devtools/go/go-build_git.bb: Exception during build_dependencies for fetcher_hashes_dummyfunc
> WARNING: /oe/build/../meta-virtualization/recipes-devtools/go/go-build_git.bb: Error during finalise of /oe/build/../meta-virtualization/recipes-devtools/go/go-build_git.bb
> ERROR: ExpansionError during parsing /oe/build/../meta-virtualization/recipes-devtools/go/go-build_git.bb
> Traceback (most recent call last):
>   File "Var <fetcher_hashes_dummyfunc[vardepvalue]>", line 1, in <module>
>   File "/oe/poky/bitbake/lib/bb/fetch2/__init__.py", line 834, in get_hashvalue(d=<bb.data_smart.DataSmart object at 0x7f0fd64ce640>, method_name='sortable_revision'):
>      def get_hashvalue(d, method_name='sortable_revision'):
>     >    pkgv, revs = _get_srcrev(d, method_name=method_name)
>          return " ".join(revs)
>   File "/oe/poky/bitbake/lib/bb/fetch2/__init__.py", line 804, in _get_srcrev(d=<bb.data_smart.DataSmart object at 0x7f0fd64ce640>, method_name='sortable_revision'):
>          if not format:
>     >        raise FetchError("The SRCREV_FORMAT variable must be set when multiple SCMs are used.\n"\
>                               "The SCMs are:\n%s" % '\n'.join(scms))
> bb.data_smart.ExpansionError: Failure expanding variable fetcher_hashes_dummyfunc[vardepvalue], expression was ${@bb.fetch.get_hashvalue(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/lf-edge/runx;nobranch=1;name=runx;protocol=https
> git://github.com/opencontainers/runc;branch=release-1.1;name=runc;protocol=https;destsuffix=git/src/import/gobuild/go/src/github.com/opencontainers/runc
> The variable dependency chain for the failure is: fetcher_hashes_dummyfunc[vardepvalue]
>
> ERROR: Parsing halted due to errors, see error messages above
>

As I mentioned several times ... just use master-next. I'm more than
aware of what the patch does, and what it means.

I'm on holidays and without access to my normal build infrastructure,
so I'm only queuing changes until I return to the office tomorrow.

Bruce


> Cheers,
>
> -Mikko
>
> On Mon, Aug 28, 2023 at 02:28:34PM -0600, Javier Tia wrote:
> > Recipes that use multiple SCMs in the SRC_URI, must supply SRCREV_FORMAT
> > to avoid an expansion error.
> >
> > Signed-off-by: Javier Tia <javier.tia@linaro.org>
> > ---
> >  recipes-devtools/go/go-build_git.bb | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/recipes-devtools/go/go-build_git.bb b/recipes-devtools/go/go-build_git.bb
> > index 2337c9e1..2a78be01 100644
> > --- a/recipes-devtools/go/go-build_git.bb
> > +++ b/recipes-devtools/go/go-build_git.bb
> > @@ -4,12 +4,12 @@ DESCRIPTION = "Xen Runtime for OCI"
> >
> >  SRCREV_runx = "f24efd33fb18469e9cfe4d1bfe8e2c90ec8c4e93"
> >  SRCREV_runc = "1e7bb5b773162b57333d57f612fd72e3f8612d94"
> > -
> > +SRCREV_FORMAT = "runx"
> >  SRC_URI = "\
> > -       git://github.com/lf-edge/runx;nobranch=1;name=runx;protocol=https \
> > -          git://github.com/opencontainers/runc;branch=release-1.1;name=runc;protocol=https;destsuffix=git/src/import/gobuild/go/src/github.com/opencontainers/runc \
> > -          file://0001-build-use-instead-of-go.patch \
> > -       "
> > +    git://github.com/lf-edge/runx;nobranch=1;name=runx;protocol=https \
> > +    git://github.com/opencontainers/runc;branch=release-1.1;name=runc;protocol=https;destsuffix=git/src/import/gobuild/go/src/github.com/opencontainers/runc \
> > +    file://0001-build-use-instead-of-go.patch \
> > +"
> >  SRC_URI[md5sum] = "0d701ac1e2a67d47ce7127432df2c32b"
> >  SRC_URI[sha256sum] = "5a26478906d5005f4f809402e981518d2b8844949199f60c4b6e1f986ca2a769"
> >
> > --
> > 2.42.0
> >
>
> >
> >
> >
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#8269): https://lists.yoctoproject.org/g/meta-virtualization/message/8269
> Mute This Topic: https://lists.yoctoproject.org/mt/101018420/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-04 13:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-28 20:28 [PATCH] go-build: add SRCREV_FORMAT Javier Tia
2023-08-29  2:20 ` [meta-virtualization] " Bruce Ashfield
2023-08-29 18:05   ` Javier Tia
2023-09-04  6:39 ` Mikko Rapeli
2023-09-04 13:58   ` Bruce Ashfield

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.