Skip to contentSkip to conversation

yq_git: Set apply=no for SRC_URI diff

PATCH In review [email protected] 2 participants 2 messages Jun 19, 2024 – Jun 24, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 yq_git: Set apply=no for SRC_URI diff

From: Robert Yang <[email protected]>

Fixed a do_patch error use git shallow tarball (BB_GIT_SHALLOW = "1"):

$ bitbake yp -cpatch

ERROR: do_patch: Importing patch 'github.com.pkg.diff' with striplevel '1'

The github.com.pkg.diff is ud.clonedir of git://github.com/pkg/diff:
* When use regular git repo as source, oe.patch.patch_path() will NOT handle it as a patch since the directory github.com.pkg.diff exists, and nothing is wrong.

* When use git shallow tarball, the github.com.pkg.diff doesn't exist since it is fetched as a tarball, then oe.patch.patch_path() will handle it as a patch, then the error happens.

---
 recipes-devtools/yq/yq_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-devtools/yq/yq_git.bb +1 -1
index 014101ba..a1adfc96 100644
@@ -41,7 +41,7 @@ SRC_URI = "git://${GO_IMPORT};name=yq;branch=master;protocol=https;destsuffix=${
            git://github.com/magiconair/properties;name=properties;destsuffix=build/vendor/src/github.com/magiconair/properties;branch=main;protocol=https \
            git://github.com/golang/net;name=net;destsuffix=build/vendor/src/golang.org/x/net;branch=master;protocol=https \
            git://github.com/golang/text;name=text;destsuffix=build/vendor/src/golang.org/x/text;branch=master;protocol=https \
-           git://github.com/pkg/diff;name=diff;destsuffix=build/vendor/src/github.com/pkg/diff;branch=main;protocol=https \
+           git://github.com/pkg/diff;name=diff;destsuffix=build/vendor/src/github.com/pkg/diff;branch=main;protocol=https;apply=no \
            file://run-ptest \
            "
 
Signature · 1 line
2.45.1
#1 lore raw

staged on master-next

Bruce

In message: [meta-virtualization][PATCH] yq_git: Set apply=no for SRC_URI diff

Quoted 48 lines · on 19/06/2024 Robert Yang via lists.yoctoproject.org wrote:

From: Robert Yang <[email protected]>

Fixed a do_patch error use git shallow tarball (BB_GIT_SHALLOW = "1"):

$ bitbake yp -cpatch

ERROR: do_patch: Importing patch 'github.com.pkg.diff' with striplevel '1'

The github.com.pkg.diff is ud.clonedir of git://github.com/pkg/diff:
* When use regular git repo as source, oe.patch.patch_path() will NOT handle it as a patch since the directory github.com.pkg.diff exists, and nothing is wrong.

* When use git shallow tarball, the github.com.pkg.diff doesn't exist since it is fetched as a tarball, then oe.patch.patch_path() will handle it as a patch, then the error happens.

---
 recipes-devtools/yq/yq_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-devtools/yq/yq_git.bb +1 -1
index 014101ba..a1adfc96 100644
@@ -41,7 +41,7 @@ SRC_URI = "git://${GO_IMPORT};name=yq;branch=master;protocol=https;destsuffix=${
            git://github.com/magiconair/properties;name=properties;destsuffix=build/vendor/src/github.com/magiconair/properties;branch=main;protocol=https \
            git://github.com/golang/net;name=net;destsuffix=build/vendor/src/golang.org/x/net;branch=master;protocol=https \
            git://github.com/golang/text;name=text;destsuffix=build/vendor/src/golang.org/x/text;branch=master;protocol=https \
-           git://github.com/pkg/diff;name=diff;destsuffix=build/vendor/src/github.com/pkg/diff;branch=main;protocol=https \
+           git://github.com/pkg/diff;name=diff;destsuffix=build/vendor/src/github.com/pkg/diff;branch=main;protocol=https;apply=no \
            file://run-ptest \
            "
 
Signature · 11 lines
2.45.1



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8804): https://lists.yoctoproject.org/g/meta-virtualization/message/8804
Mute This Topic: https://lists.yoctoproject.org/mt/106757049/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-