yq: Correct the version (4.45.1+)
PATCH 1/1 yq: Correct the version (4.45.1+)
The current version of yq is actually based on 4.45.1.
Also remove ${SRCREV_yq} from PV to allow devtool modify yq to work. And remove the do_compile:prepend(). It is not needed and removing it allows yq to be built after devtooling it.
---
In addition to the changes in this commit, I would also suggest setting SRCREV_FORMAT = "default" to only include the SHA-1 for yq in PV. I do not see the reason to include the SHA-1 for the color module when the SHA-1s for all the other modules are not included.
recipes-devtools/yq/yq_git.bb | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-)
recipes-devtools/yq/yq_git.bb +7 -21
@@ -1,4 +1,4 @@ -SUMMARY = "a lightweight and portable command-line YAML processor " +SUMMARY = "A lightweight and portable command-line YAML processor" HOMEPAGE = "https://github.com/mikefarah/yq" LICENSE = "MIT"
@@ -81,32 +81,18 @@ SRC_URI += "git://github.com/alecthomas/participle;name=v2;protocol=https;nobran SRCREV_mousetrap = "4e8053ee7ef85a6bd26368364a6d27f1641c1d21" SRC_URI += "git://github.com/inconshreveable/mousetrap;name=mousetrap;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor/github.com/inconshreveable/mousetrap" -PV = "4.30.8+git${SRCREV_yq}" +PV = "4.45.1+git" GO_IMPORT = "github.com/mikefarah/yq" +export GO111MODULE = "off" inherit go ptest -do_compile:prepend() { - # arrange for some of the golang built ins to be found - ( - cd ${WORKDIR}/build/src/ - ln -sf ${STAGING_DIR_TARGET}/${prefix}/lib/go/src/cmd/vendor/golang.org . - - cd ${WORKDIR}/build/ - ln -sf ${UNPACKDIR}/build/vendor . - ) - - # arrange for the fetched dependencies to be found - export GOPATH="${GOPATH}:${WORKDIR}/build/vendor/" - export GO111MODULE=off -} - do_install_ptest() { install -d ${D}${PTEST_PATH}/tests - cp -r ${S}/src/github.com/mikefarah/yq/scripts/* ${D}${PTEST_PATH}/tests - cp -r ${S}/src/github.com/mikefarah/yq/acceptance_tests/* ${D}${PTEST_PATH}/tests - cp -r ${S}/src/github.com/mikefarah/yq/examples ${D}${PTEST_PATH}/tests + cp -r ${S}/src/${GO_IMPORT}/scripts/* ${D}${PTEST_PATH}/tests + cp -r ${S}/src/${GO_IMPORT}/acceptance_tests/* ${D}${PTEST_PATH}/tests + cp -r ${S}/src/${GO_IMPORT}/examples ${D}${PTEST_PATH}/tests } RDEPENDS:${PN}-ptest += " \
@@ -114,7 +100,7 @@ RDEPENDS:${PN}-ptest += " \ " RDEPENDS:${PN}-dev += " \ - bash \ + bash \ " BBCLASSEXTEND = "native"
Quoted 5 lines · Peter Kjellerstedt via lists.yoctoproject.org
The current version of yq is actually based on 4.45.1.
Also remove ${SRCREV_yq} from PV to allow
devtool modify yqto work. And remove the do_compile:prepend(). It is not needed and removing it allows yq to be built after devtooling it.
I will fix the PV bump, but I don't need most of the other parts.
I'm not a fan of pedantic "just because" changes. If nothing is Broken, I just leave things as they are.
The do_compile prepend still seems to be needed in on one of my builders as well, I'll investigate that more later, and can Drop it once I understand what is going on.
Quoted 8 lines
Signed-off-by Peter Kjellerstedt <[email protected]>---
In addition to the changes in this commit, I would also suggest setting
SRCREV_FORMAT= "default" to only include the SHA-1 for yq in PV. I do not see the reason to include the SHA-1 for the color module when the SHA-1s for all the other modules are not included.
I'll also leave that as-is, I really should list them all, but chose it to be
A better representative multi scm SRCREV.
I've never seen "default" documented anywhere. Do you have a link to why I'd use / consider it ?
Quoted 55 lines
recipes-devtools/yq/yq_git.bb | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-)recipes-devtools/yq/yq_git.bb +1
-1@@ -1,4 +1,4 @@ -SUMMARY = "a lightweight and portable command-line YAML processor " +SUMMARY = "A lightweight and portable command-line YAML processor" HOMEPAGE = "https://github.com/mikefarah/yq" LICENSE = "MIT"@@ -81,32 +81,18 @@ SRC_URI += "git://github.com/alecthomas/participle;name=v2;protocol=https;nobran
SRCREV_mousetrap= "4e8053ee7ef85a6bd26368364a6d27f1641c1d21"
SRC_URI+= "git://
github.com/inconshreveable/mousetrap;name=mousetrap;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor/github.com/inconshreveable/mousetrap
<http://github.com/inconshreveable/mousetrap;name=mousetrap;protocol=https;nobranch=1;destsuffix=$%7BGO_SRCURI_DESTSUFFIX%7D/vendor/github.com/inconshreveable/mousetrap>
"recipes-devtools/yq/yq_git.bb +2
-6-PV = "4.30.8+git${SRCREV_yq}" +PV = "4.45.1+git" GO_IMPORT = "github.com/mikefarah/yq" +export GO111MODULE = "off" inherit go ptest -do_compile:prepend() { - # arrange for some of the golang built ins to be found - ( - cd ${WORKDIR}/build/src/ - ln -sf ${STAGING_DIR_TARGET}/${prefix}/lib/go/src/cmd/vendor/golang.org .
recipes-devtools/yq/yq_git.bb +0
-11- - cd ${WORKDIR}/build/ - ln -sf ${UNPACKDIR}/build/vendor . - ) - - # arrange for the fetched dependencies to be found - export GOPATH="${GOPATH}:${WORKDIR}/build/vendor/" - export GO111MODULE=off -} - do_install_ptest() { install -d ${D}${PTEST_PATH}/tests - cp -r ${S}/src/github.com/mikefarah/yq/scripts/*${D}${PTEST_PATH}/tests
- cp -r ${S}/src/github.com/mikefarah/yq/acceptance_tests/*
${D}${PTEST_PATH}/tests
- cp -r ${S}/src/github.com/mikefarah/yq/examples
${D}${PTEST_PATH}/tests
recipes-devtools/yq/yq_git.bb SRC_URI += "git://github.com/alecthomas/participle;name=v2;protocol=https;nobran · line 95
Quoted 3 lines
recipes-devtools/yq/yq_git.bb +3
-0+ cp -r ${S}/src/${GO_IMPORT}/scripts/* ${D}${PTEST_PATH}/tests + cp -r ${S}/src/${GO_IMPORT}/acceptance_tests/* ${D}${PTEST_PATH}/tests + cp -r ${S}/src/${GO_IMPORT}/examples ${D}${PTEST_PATH}/tests
I like that change as well.
I'll split up the commit here and see if I can get the bits I want.
Cheers,
Bruce
Quoted 24 lines
}
RDEPENDS:${PN}-ptest += " \
recipes-devtools/yq/yq_git.bb +1
-2@@ -114,7 +100,7 @@ RDEPENDS:${PN}-ptest += " \ " RDEPENDS:${PN}-dev += " \ - bash \ + bash \ " BBCLASSEXTEND = "native" -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group. View/Reply Online (#9232):
https://lists.yoctoproject.org/g/meta-virtualization/message/9232
Mute This Topic: https://lists.yoctoproject.org/mt/112360308/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 104 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 5 lines · Peter Kjellerstedt via lists.yoctoproject.org
The current version of yq is actually based on 4.45.1.
Also remove ${SRCREV_yq} from PV to allow
devtool modify yqto work. And remove the do_compile:prepend(). It is not needed and removing it allows yq to be built after devtooling it.I will fix the PV bump, but I don't need most of the other parts.
I'm not a fan of pedantic "just because" changes. If nothing is Broken, I just leave things as they are.
The
do_compileprepend still seems to be needed in on one of my builders as well, I'll investigate that more later, and can Drop it once I understand what is going on.Quoted 8 lines
Signed-off-by Peter Kjellerstedt <[email protected]>---
In addition to the changes in this commit, I would also suggest setting
SRCREV_FORMAT= "default" to only include the SHA-1 for yq in PV. I do not see the reason to include the SHA-1 for the color module when the SHA-1s for all the other modules are not included.I'll also leave that as-is, I really should list them all, but chose it to be
A better representative multi scm SRCREV.
I've never seen "default" documented anywhere. Do you have a link to why I'd use / consider it ?Quoted 58 lines
recipes-devtools/yq/yq_git.bb | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-)recipes-devtools/yq/ renamed from recipes-devtools/yq/yq_git.bb +0
-0yq_git.bb
index0e9d36ca..f934e2b2100644recipes-devtools/yq/yq_git.bb +1
-1@@ -1,4 +1,4 @@ -SUMMARY = "a lightweight and portable command-line YAML processor " +SUMMARY = "A lightweight and portable command-line YAML processor" HOMEPAGE = "https://github.com/mikefarah/yq" LICENSE = "MIT"@@ -81,32 +81,18 @@ SRC_URI += "git://github.com/alecthomas/participle;name=v2;protocol=https;nobran
SRCREV_mousetrap= "4e8053ee7ef85a6bd26368364a6d27f1641c1d21"
SRC_URI+= "git://
github.com/inconshreveable/mousetrap;name=mousetrap;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor/github.com/inconshreveable/mousetrap
<http://github.com/inconshreveable/mousetrap;name=mousetrap;protocol=https;nobranch=1;destsuffix=$%7BGO_SRCURI_DESTSUFFIX%7D/vendor/github.com/inconshreveable/mousetrap>
"recipes-devtools/yq/yq_git.bb +2
-6-PV = "4.30.8+git${SRCREV_yq}" +PV = "4.45.1+git" GO_IMPORT = "github.com/mikefarah/yq" +export GO111MODULE = "off" inherit go ptest -do_compile:prepend() { - # arrange for some of the golang built ins to be found - ( - cd ${WORKDIR}/build/src/ - ln -sf ${STAGING_DIR_TARGET}/${prefix}/lib/go/src/cmd/vendor/golang.org .
recipes-devtools/yq/yq_git.bb +0
-11- - cd ${WORKDIR}/build/ - ln -sf ${UNPACKDIR}/build/vendor . - ) - - # arrange for the fetched dependencies to be found - export GOPATH="${GOPATH}:${WORKDIR}/build/vendor/" - export GO111MODULE=off -} - do_install_ptest() { install -d ${D}${PTEST_PATH}/tests - cp -r ${S}/src/github.com/mikefarah/yq/scripts/*${D}${PTEST_PATH}/tests
- cp -r ${S}/src/github.com/mikefarah/yq/acceptance_tests/*
${D}${PTEST_PATH}/tests
- cp -r ${S}/src/github.com/mikefarah/yq/examples
${D}${PTEST_PATH}/testsrecipes-devtools/yq/yq_git.bb +2
-0+ cp -r ${S}/src/${GO_IMPORT}/scripts/* ${D}${PTEST_PATH}/tests + cp -r ${S}/src/${GO_IMPORT}/acceptance_tests/*Quoted 2 lines
${D}${PTEST_PATH}/tests
+ cp -r ${S}/src/${GO_IMPORT}/examples ${D}${PTEST_PATH}/testsI like that change as well.
Quoted 2 lines
I'll split up the commit here and see if I can get the bits I want.
I've chopped up the commit with git and grabbed the least footprint parts of the change.
Once the dust settles on the release, I'll look at the do_compile:prepend() to understand why one of my builds blew up (could be some mix of branches, or something equally incorrect).
I'll stage that part of the commit on master-next so that I can't forget.
Bruce
Quoted 39 lines
Cheers,
Bruce
Quoted 8 lines
}
RDEPENDS:${PN}-ptest += " \
recipes-devtools/yq/yq_git.bb RDEPENDS:${PN}-ptest += " \ · line 106
Quoted 8 lines
recipes-devtools/yq/yq_git.bb +1
-1@@ -114,7 +100,7 @@ RDEPENDS:${PN}-ptest += " \ " RDEPENDS:${PN}-dev += " \ - bash \ + bash \ " BBCLASSEXTEND = "native"--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#9233):
https://lists.yoctoproject.org/g/meta-virtualization/message/9233
Mute This Topic: https://lists.yoctoproject.org/mt/112360308/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
[ Unfortunately, Outlook does not support answering inline properly in HTML mails so I will have to top post. ]
Odd that you saw problems building after removing the do_compile:prepend(). I verified that I could build the recipe with and without having devtooled it, and I also verified that I could build the yq-native variant.
The reason I did that change was because I wanted to devtool modify the recipe. It first failed due to the use of ${SRCREV_yq} in PV. Once I fixed that, it failed to build due to the use of ${WORKDIR}/build instead of ${B}. So II fixed that too, but then I realized I could just remove almost the entire do_compile:prepend() and still build it. Since this both corrected the recipe and simplified it, I saw this as a win-win.
“default” is simply the default name for a URL if none has been specified using name=. But you are correct, in this case it would be SRCREV_FORMAT = "yq" since the primary URL does have a name. (Of course, you could remove the name from the URL, but given your reluctance to change things that work, I do not see that happening. 😉)
//Peter
From: Bruce Ashfield <[email protected]>
Sent: den 20 april 2025 23:37
To: [email protected]
Cc: Peter Kjellerstedt <[email protected]>; [email protected]
Subject: Re: [meta-virtualization] [PATCH] yq: Correct the version (4.45.1+)
On Sun, Apr 20, 2025 at 5:10 PM Bruce Ashfield via lists.yoctoproject.org<http://lists.yoctoproject.org> <[email protected]<mailto:[email protected]>> wrote:
On Sun, Apr 20, 2025 at 8:46 AM Peter Kjellerstedt via lists.yoctoproject.org<http://lists.yoctoproject.org> <[email protected]<mailto:[email protected]>> wrote:
The current version of yq is actually based on 4.45.1.
Also remove ${SRCREV_yq} from PV to allow devtool modify yq to work. And remove the do_compile:prepend(). It is not needed and removing it allows yq to be built after devtooling it.
I will fix the PV bump, but I don't need most of the other parts.
I'm not a fan of pedantic "just because" changes. If nothing is Broken, I just leave things as they are.
The do_compile prepend still seems to be needed in on one of my builders as well, I'll investigate that more later, and can Drop it once I understand what is going on.
---
In addition to the changes in this commit, I would also suggest setting SRCREV_FORMAT = "default" to only include the SHA-1 for yq in PV. I do not see the reason to include the SHA-1 for the color module when the SHA-1s for all the other modules are not included.
I'll also leave that as-is, I really should list them all, but chose it to be A better representative multi scm SRCREV.
I've never seen "default" documented anywhere. Do you have a link to why I'd use / consider it ?
recipes-devtools/yq/yq_git.bb<http://yq_git.bb> | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-)
recipes-devtools/yq/yq_git.bb<http://yq_git.bb> +6 -20
@@ -1,4 +1,4 @@ -SUMMARY = "a lightweight and portable command-line YAML processor " +SUMMARY = "A lightweight and portable command-line YAML processor" HOMEPAGE = "https://github.com/mikefarah/yq" LICENSE = "MIT"
@@ -81,32 +81,18 @@ SRC_URI += "git://github.com/alecthomas/participle;name=v2;protocol=https;nobran<http://github.com/alecthomas/participle;name=v2;protocol=https;nobran> SRCREV_mousetrap = "4e8053ee7ef85a6bd26368364a6d27f1641c1d21" SRC_URI += "git://github.com/inconshreveable/mousetrap;name=mousetrap;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor/github.com/inconshreveable/mousetrap<http://github.com/inconshreveable/mousetrap;name=mousetrap;protocol=https;nobranch=1;destsuffix=$%7BGO_SRCURI_DESTSUFFIX%7D/vendor/github.com/inconshreveable/mousetrap>" -PV = "4.30.8+git${SRCREV_yq}" +PV = "4.45.1+git" GO_IMPORT = "github.com/mikefarah/yq<http://github.com/mikefarah/yq>" +export GO111MODULE = "off" inherit go ptest -do_compile:prepend() { - # arrange for some of the golang built ins to be found - ( - cd ${WORKDIR}/build/src/ - ln -sf ${STAGING_DIR_TARGET}/${prefix}/lib/go/src/cmd/vendor/golang.org<http://golang.org> . - - cd ${WORKDIR}/build/ - ln -sf ${UNPACKDIR}/build/vendor . - ) - - # arrange for the fetched dependencies to be found - export GOPATH="${GOPATH}:${WORKDIR}/build/vendor/" - export GO111MODULE=off -} - do_install_ptest() { install -d ${D}${PTEST_PATH}/tests - cp -r ${S}/src/github.com/mikefarah/yq/scripts/*<http://github.com/mikefarah/yq/scripts/*> ${D}${PTEST_PATH}/tests - cp -r ${S}/src/github.com/mikefarah/yq/acceptance_tests/*<http://github.com/mikefarah/yq/acceptance_tests/*> ${D}${PTEST_PATH}/tests - cp -r ${S}/src/github.com/mikefarah/yq/examples<http://github.com/mikefarah/yq/examples> ${D}${PTEST_PATH}/tests + cp -r ${S}/src/${GO_IMPORT}/scripts/* ${D}${PTEST_PATH}/tests + cp -r ${S}/src/${GO_IMPORT}/acceptance_tests/* ${D}${PTEST_PATH}/tests + cp -r ${S}/src/${GO_IMPORT}/examples ${D}${PTEST_PATH}/tests
I like that change as well.
I'll split up the commit here and see if I can get the bits I want.
I've chopped up the commit with git and grabbed the least footprint parts of the change.
Once the dust settles on the release, I'll look at the do_compile:prepend() to understand why one of my builds blew up (could be some mix of branches, or something equally incorrect).
I'll stage that part of the commit on master-next so that I can't forget.
Bruce
Cheers,
Bruce
}
RDEPENDS:${PN}-ptest += " \
@@ -114,7 +100,7 @@ RDEPENDS:${PN}-ptest += " \
"
RDEPENDS:${PN}-dev += " \
- bash \
+ bash \
"
BBCLASSEXTEND = "native"
--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9233): https://lists.yoctoproject.org/g/meta-virtualization/message/9233
Mute This Topic: https://lists.yoctoproject.org/mt/112360308/1050810
Group Owner: [email protected]<mailto:meta-virtualization%[email protected]>
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]<mailto:[email protected]>]
-=-=-=-=-=-=-=-=-=-=-=-
--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II